-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
[hiccup, hdom](examples/commit-table-ssr) - react-like hydrate? #39
Comments
Fundamentally, yes there is, but you must understand that hdom is not like react because hdom never diffs against the real DOM, but only against another hdom tree/array. So in a way hydrate already is there, but the There's one other difference which needs to be taken care of: @thi.ng/hiccup doesn't wrap text nodes in But other than those 2 small things it should just work... |
Actually, reading more about react's hydrate, the above is not sufficient :( The first client tree would still need to be processed (partially at least) to attach missing event handlers, that would be not be too hard either though... |
- add HDOMOpts interface - add hydrateDOM() - update start() to support hydration - re-use migrated NO_SPANS const from hiccup - switch all fn to arrow fns BREAKING CHANGE: start() args now as options object
- replace args with HDOMOpts - add support for `hydrate` - reflect same logic as w/ hdom `start()` re: null values BREAKING CHANGE: rename transducer: `updateUI` => `updateDOM`, new API
So I've just updated Also see: |
Great. Thank you! Digging in! |
Closing this for now. Please open a new issue if you run into any probs with |
Just got around to reading the code and it looks like the browser and SSR version are separate in the sense that unlike react's hydrate we get either one or the other but not the best of both worlds.
hydrate
is what I meant to express (admittedly, through a handshake emoji) in this tweet.Is there a hydration story for hiccup / hdom?
The text was updated successfully, but these errors were encountered: