3 ms·
React can render static markup without additional frameworks. You can basically run your React code in Node.js and either cache the HTML to disk or have it run
by mr_toad 8y ago
React can render static markup without additional frameworks. You can basically run your React code in Node.js and either cache the HTML to disk or have it run on request.
ReactDOMServer.renderToStaticMarkup();
- mharroun 8y agoThis ignores the "has many interactive elements" part of my comment. Having server-side render react code that can also hydrate and then be interactive (or at least parts of it) is not that simple.
- mpeg 8y agoHydration is also built-into React [0] I'm curious about what you consider complex about an SSR setup with React, I'm becoming very familiar with the internals of React and frameworks like Next and they're often relatively thin wrappers over the built-in features. [0]: https://reactjs.org/docs/react-dom.html#hydrate https://reactjs.org/docs/react-dom.html#hydrate