miso
Copyright(C) 2016-2025 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <code@dmj.io>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.Reload

Contents

Description

Support for live-reload of miso applications.

Synopsis

Live reload

reload Source #

Arguments

:: IO ()

An IO action typically created using miso or startApp

-> IO () 

Clears the body and head on each reload.

Meant to be used with WASM browser mode.

This function executes an IO action, clearing both the body and head of the current page in the process.

main :: IO ()
main = reload (startApp defaultEvents app)

Since: 1.9.0.0