4 ms·
Can you explain how a virtual DOM solves what you're talking about? Seems to be a non sequitur to me.
by cercatrova 6y ago
Can you explain how a virtual DOM solves what you're talking about? Seems to be a non sequitur to me.
- dnautics 6y agoThere's all sorts of separate sources of truth in that system: Data that exists in the server, data that exists in your javascript frontend, data that exists as pixel intensities in the screet. At a high level, the virtual DOM exists to arbitrate the non-simultaneity of updates to all of these moving parts. It lets react model its system as a "single source of truth" with a functional "prop-drilling system". It gives react components gravity to a data source it can consider authoritative (separate from the actual DOM which attracts the browser's own sets of sub-applications) which is also separate from the applications sitting on top of your data in the server, etc. etc. etc.