React SSR & SPA Combined

1k Views Asked by At

Developing a React app with NodeJS backend.

Will provide an SSR of every page of the app (which will also be cached to Redis to reduce duplicate renders) to ensure a strong SEO experience. This will be the default for accounts/spiders not logged in. (no active session).

When users login they will receive a SPA (react bundle) and run a React/Redux environment with API calls for more data.

Question: Is this a fair way to build a React environment that also caters to SEO? Any obvious flaws or better solutions? Its the first time I've tried SSR.

Don't really want to use Next.JS etc so plan to use reactDomServer to render to string which I believe is Synchronous so will take the extra server load into consideration.

import ReactDOMServer from 'react-dom/server';

Also the site will run Adsense which shouldn't make any difference in a SSR/CSR environment.

Question: Are there an issues delivering SSR pages to Spiders (with no state) and the having an SPA that delivers the same pages with state. eg: some pages will have 2 slightly different versions. I assume no.

thanks

0

There are 0 best solutions below