You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm finding that, when this widget is removed, the runCanvas effect continues to run, and as this widget is removed and re-added, the effects stack, resulting is performance slowdown and memory buildup.
Does Concur have something like React's componentWillUnmount to clean up effects, like the example above.
The text was updated successfully, but these errors were encountered:
I find myself in need of "widget finalisers" as well. My particular use case is a drag & drop implementation, for which I need to add event handlers to the document directly (so that mouse movements are registered outside the element, as well as browser). The problem is that without finalisers there's no way to remove the previously added event handlers if a Widget that's in the middle of a drag & drop cycle gets killed.
Maybe something like:
withFinaliser :: forall a. Effect Unit -> Widget v a -> Widget v a
where the effect would be called if the Widget itself or any of its parents gets killed.
I have started working on a new VDom backend for Concur which uses Halogen-VDom. With this, I think we'll also be able to have components with internal persistent state, and initialisers and finalisers. I am still coming up with an appropriate API.
I will be adding support for internal state, and React lifecycle methods such as componentWillUnmount to the React backend as well.
I hope to have the same unified API for both of these things.
Say that I have a widget that runs in parallel with an
Effect
, such ascanvas [ _id $ show canvasId ] [] <|> (liftAff (runCanvas canvasId) *> empty)
I'm finding that, when this widget is removed, the
runCanvas
effect continues to run, and as this widget is removed and re-added, the effects stack, resulting is performance slowdown and memory buildup.Does Concur have something like React's
componentWillUnmount
to clean up effects, like the example above.The text was updated successfully, but these errors were encountered: