reflex-dom
reflex-dom copied to clipboard
Unification of mount state PRs
This contains #271 and #273 so far. #273 uses a Dynamic
mount state approach that has some performance overhead. #272 provides an event interface that lets you know when something is mounted, which doesn't have the performance overhead.
The options now are:
(a) Merge #272 on top of this and switch to the Event
interface, or, (b) Don't merge #272 and incur the penalty.
Regardless of which of these options we select, the next step will be to merge develop
into this.
I'm going to pursue option (a) - it gets us most of the benefit without the cost.
I agree that Event-based API seems sufficient for the cases I've encountered. I can't recall if it includes "Unmounted" event? If so we can create the dynamic ourselves when needed.
Is someone still working on this?
It was paused as we fixed some hydration issues. I'll have a look at the conflicts with develop and hopefully get this merged very soon.
Any recent updates on this? I'm attempting to implement a wrapper around the Material Design Components for the web https://material.io/develop/web/ and am a bit stuck figuring out how to handle calling the clean up methods on the components that need them.
If someone were to pick this up, what is left to do? Obviously resolve merge conflicts. If it were me I would also add an unmount event. Is there anything else that needs to be done?
Are there any update on this?
ping. It's currently difficult interface with several of the web-API methods (eg: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView) because there's no way to check if something actually exists in the DOM.