-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
A part of my app should update continuously.
let delayedDownload (delayInMin:int) = async {
do! delayInMin * 60 |> Task.Delay |> Async.AwaitTask
return! remote.getDownloadLinks ()
}
I put this in a Cmd and when I get the 'msg I schedule it again.
But on closing the page this continuous to run.
I need a way to detect, that the window has been closed, to stop that scheduling.
Adding a component and dispatching a 'msg on Dispose seems to work. Although it takes 3 minutes from closing the window until the Dispose and I haven´t figured out how to give the component the dispatch function.
Is there a recommended way to do this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels