elm-hot-reload icon indicating copy to clipboard operation
elm-hot-reload copied to clipboard

It would be great if in-progress effects could be restarted

Open ccapndave opened this issue 9 years ago • 0 comments

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.

ccapndave avatar Apr 07 '16 09:04 ccapndave