2 ms·
Isn't this incompatible with server side rendering? Rendering the page's contents initially on the server is good for performance, SEO, accessibility, etc.
by jasonhansel 8y ago
Isn't this incompatible with server side rendering? Rendering the page's contents initially on the server is good for performance, SEO, accessibility, etc.
- Twisol 8y agoSince this page is talking about SPAs, the only "entry point" it considers is `index.html`. I don't see anything against pre-rendering parts of `index.html` on the server-side -- just that the configuration embedded in `index.html` of _which_ static assets to use and _what_ the environment defines must be managed. In multi-page applications (MPAs?), among the other things that would probably have to be accounted for, you could treat all of your pages as "entry points" in the same way as `index.html`.
- __oh_es 8y agoNope - works perfectly. With React/Redux you can inject the initial state into the rendered page. Subsequent calls are then just api. See https://redux.js.org/recipes/serverrendering#inject-initial-component-html-and-state https://redux.js.org/recipes/serverrendering#inject-initial-... for ideas.
- jugglebird 8y agoThere are elements of the article that argue against that though. It argues that the index.html will be small (and thus not an issue to not cache), which will not be the case if you're server-rendering pages.