elm-hot-reload
elm-hot-reload copied to clipboard
It would be great if in-progress effects could be restarted
Specifically in my app I have a stopwatch running, which works by having a constantly ticking:
{-| An effect that triggers TimerTick after 1 second
-}
tickSecond : Effects Action
tickSecond =
Task.sleep 1000
`Task.andThen` (always <| Task.succeed TimerTick)
|> Effects.task
Obviously since elm-hot-reload just replaces the model, this task doesn't get restarted. It would be nice if we could somehow track in-progress effects that haven't yet completed, and restart them at the same time as reloading the state.