3 ms·
React adds one layer of indirection such that it's spitting out "a description of what to render" rather than "a string of HTML to render" directly. That means
by exogen 8y ago
React adds one layer of indirection such that it's spitting out "a description of what to render" rather than "a string of HTML to render" directly.
That means the same code can be used both on the server and client: the description can be used to render to an HTML string, or to create and update client-side DOM nodes.
(React isn't special in this regard anymore, other modern web libraries have taken what still look like old-school templates but stopped using HTML strings as their immediate target.)