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
So mount() and unmount() are much trickier than they would appear at first glance. I think that's the main barrier to having "components" as you would think about them in something like React.
As filed here, on-load correctly fires onunload when replaceChild(next, prev) is fired, because for a short period of time (I assume one tick, but a setTimeout(() => {}, 0) does not work) the DOM node is actually not present in the DOM. on-load is doing its job correctly. Since there is no reference to the node for a split second during that time, I'm having trouble finding a good way to tell if the node removal was in the act of morphing the DOM, or actually a valid unmounting, like from a route change.
Other issues
A good outline (from Choo) is here. It also references a few issues that I'll also need to ensure are addressed and tested and added to docs:
On global state updates, they're currently morphing on a local level, and returning the morphed ref. How does this affect the top-level morph operation? Does it essentially morph twice (I don't think so) or does it result in the same node? (this should be what happens)
How can I better utilize .isSameNode() or expose it for users?
The text was updated successfully, but these errors were encountered:
So
mount()
andunmount()
are much trickier than they would appear at first glance. I think that's the main barrier to having "components" as you would think about them in something like React.As filed here, on-load correctly fires
onunload
whenreplaceChild(next, prev)
is fired, because for a short period of time (I assume one tick, but asetTimeout(() => {}, 0)
does not work) the DOM node is actually not present in the DOM. on-load is doing its job correctly. Since there is no reference to the node for a split second during that time, I'm having trouble finding a good way to tell if the node removal was in the act of morphing the DOM, or actually a valid unmounting, like from a route change.Other issues
A good outline (from Choo) is here. It also references a few issues that I'll also need to ensure are addressed and tested and added to docs:
Additionally:
Other ideas
Questions
.isSameNode()
or expose it for users?The text was updated successfully, but these errors were encountered: