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
This makes it difficult to integrate with other frameworks (eg React), where the DOM node may be unmounted and then later remounted. Users have to ensure that unmounting and remounting occurs synchronously, which can be difficult.
Calling htmx.process might not re-init if attributes are unchanged, and deInitNode is not exported by htmx. However, ideally we'd not re-process at all.
Ideally when these events trigger on unmounted nodes, the listeners don't get removed, and instead the effect not performed. This seems to be a pattern used elsewhere in htmx. Explicit deInits could be invoked if the users want to ensure the effects of htmx-powered DOM are disabled
The text was updated successfully, but these errors were encountered:
htmx seems to cancel a some of its behaviours if events fire while nodes are not a part of the body:
htmx/src/htmx.js
Lines 1514 to 1517 in 57595bc
htmx/src/htmx.js
Lines 1778 to 1781 in 57595bc
htmx/src/htmx.js
Lines 1812 to 1817 in 57595bc
This makes it difficult to integrate with other frameworks (eg React), where the DOM node may be unmounted and then later remounted. Users have to ensure that unmounting and remounting occurs synchronously, which can be difficult.
Calling htmx.process might not re-init if attributes are unchanged, and deInitNode is not exported by htmx. However, ideally we'd not re-process at all.
Ideally when these events trigger on unmounted nodes, the listeners don't get removed, and instead the effect not performed. This seems to be a pattern used elsewhere in htmx. Explicit deInits could be invoked if the users want to ensure the effects of htmx-powered DOM are disabled
The text was updated successfully, but these errors were encountered: