onremove won't fire for children elements
See original GitHub issuePlease see https://github.com/hyperapp/hyperapp/pull/467 with a failing test for this.
Basically when an element its removed only its onremove
method seems to be called. None of the onremove
lifecycle events are called for its children.
My specific use case is:
Modal Dialog Component
|__ Camera custom component (oncreate
calls getUserMedia and onremove
closes the stream).
When I close the modal, the onremove
method of my camera is not called.
Thanks for all your work!
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Why mouseup event didn't fire for child element?
It seems like 'mouseup' event fires in draggable '.device' div then in it's parent '#devices' div then in it's parent '#main' div.
Read more >Question about onremove · Issue #112 · jorgebucaran/hyperapp ...
I'm creating an Ace interop example for a presentation and not seeing the onremove fire when removing DOM elements.. I'm thinking I need...
Read more >Element.Event - MooTools Core Documentation
This event fires when the mouse leaves the area of the DOM Element and will not be fired if the mouse crosses over...
Read more >React Hooks - Understanding Component Re-renders - Medium
App component holds 'theme' variable in its state and has two Ticker Components as children. Theme is passed to the TickerComponents as props....
Read more >AnimatePresence | Framer for Developers
Any motion components contained by the removed child that have an exit prop will fire that animation before the entire tree is finally...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Maybe related. https://github.com/picodom/picodom/issues/61
@4lejandrito I totally agree, this needs to be added to core. Not sure in what form exactly, but right now I am swaying in favor of your comment here: https://github.com/hyperapp/hyperapp/pull/470#issuecomment-349049424.