-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hydration #37
Comments
This would be possible by having alternative purescript-halogen-vdom/src/Halogen/VDom/DOM.purs Lines 71 to 75 in 8b91e55
This creates a text node, but a hypothetical hydration implementation would check the DOM for an existing node first and reuse that. |
elm implementation https://github.com/elm/virtual-dom/blob/master/src/Elm/Kernel/VirtualDom.js#L1531 react implementation e.g. here warning for text difference https://github.com/facebook/react/blob/823dc581fea8814a904579e85a62da6d18258830/packages/react-dom/src/client/ReactDOMComponent.js#L1072 also warned for extra attributes https://github.com/facebook/react/blob/823dc581fea8814a904579e85a62da6d18258830/packages/react-dom/src/client/ReactDOMComponent.js#L222 warnForPropDifference |
I have found that prerendered html should not contain any newlines because with
the correct version is
react does the same https://jsbin.com/majoxoqoje/edit?html,js,console,output extraAttributeNames are defined here https://github.com/facebook/react/blob/823dc581fea8814a904579e85a62da6d18258830/packages/react-dom/src/client/ReactDOMComponent.js#L1029-L1050 unknown props are downcased and removed https://github.com/facebook/react/blob/823dc581fea8814a904579e85a62da6d18258830/packages/react-dom/src/client/ReactDOMComponent.js#L1134 |
I have mentioned it here purescript-halogen/purescript-halogen#610 (comment)
just like for:
The second link is just for reference. It builds VDOM from DOM node, but our
hydrate
method shouldThe text was updated successfully, but these errors were encountered: