petit-dom
petit-dom copied to clipboard
Hydrate existing markup
How can I reuse existing markup from within the container that is being patched? I'm asking because I'm looking into SSR with hydration. Thanks!
I understand it's currently not supported. What would be needed to implement it? @yelouafi
Sorry for being late.
You can serve plain HTML from the server but currently the library doesn't support hydrating an existing DOM tree, you'll need to replace the whole tree with a new one (I think it should be a fast operation in modern browsers)
Would this be complex to implement in the current architecture? I think adding this would really make this already awesome library shine :)