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 using htmx in my project, which fetches new pages via XHR when you click on a link to allow for smooth, client-side routing during navigation.
Unlike other client-side frameworks, the XHR request fetches raw HTML. htmx swaps out the current DOM tree for the one returned by the server response.
This means that my client script that uses createClient doesn't execute for the new Hono JSX components that were rendered by SSR as part of the server response. In other words, my components are interactive when I do a hard refresh, bypassing htmx, but they're non-interactive if they're loaded using htmx's XHR mechanism.
I think we could use MutationObserver to hydrate if a new Hono component appears on the screen and it hasn't been hydrated yet. We already use this approach to monitor for components streamed by suspense.
The text was updated successfully, but these errors were encountered:
What is the feature you are proposing?
I'm using htmx in my project, which fetches new pages via XHR when you click on a link to allow for smooth, client-side routing during navigation.
Unlike other client-side frameworks, the XHR request fetches raw HTML. htmx swaps out the current DOM tree for the one returned by the server response.
This means that my client script that uses
createClient
doesn't execute for the new Hono JSX components that were rendered by SSR as part of the server response. In other words, my components are interactive when I do a hard refresh, bypassing htmx, but they're non-interactive if they're loaded using htmx's XHR mechanism.I think we could use MutationObserver to hydrate if a new Hono component appears on the screen and it hasn't been hydrated yet. We already use this approach to monitor for components streamed by suspense.
The text was updated successfully, but these errors were encountered: