3 ms·
While I haven't done SSR myself, my understanding of the general process is that it's about rendering that first initial page that's sent to the browser. This
by acemarke 8y ago
While I haven't done SSR myself, my understanding of the general process is that it's about rendering that first initial page that's sent to the browser. This is most beneficial for speed of initial load and SEO purposes.
An SSR React app that uses Redux would probably create a unique Redux store instance for each new client, dispatch just enough actions to fill in whatever data is needed for the initial render, and then serialize the Redux store state to the host HTML page so that it can be used to re-hydrate the Redux store on the client.
For more info, see the "React Server Rendering" [0] section of my React/Redux links list, and the "Server Rendering" recipe [1] in the Redux docs.
[0] https://github.com/markerikson/react-redux-links/blob/master/react-server-rendering.md https://github.com/markerikson/react-redux-links/blob/master...
[1] https://redux.js.org/recipes/server-rendering https://redux.js.org/recipes/server-rendering