data-reactid alternative.
See original GitHub issueI know 0.15.0 no longer uses keys in data-reactids
which is part of my issue however I’d like to bring forward a different way to link the dom for the initial render which is to keep text nodes and regular nodes separate.
I have implemented something like this in my own simple virtual dom here https://github.com/DylanPiercey/tusk/blob/master/lib/virtual/node.js#L80 and here https://github.com/DylanPiercey/tusk/blob/master/lib/virtual/text.js#L37
I am not sure if react works this way at all but essentially it recursively mounts nodes from the top down and splits up text nodes using splitText
to ensure that the server produced dom matches the virtual structure.
Just curious if something like this is feasible in react since it has allowed me to implement bootstrapping server side code while producing clean html output without checksums or ids.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:12 (8 by maintainers)
Would you be interested in creating a proof of concept of this in React?
You might want to check out
react-dom-stream
, which does some caching with SSR