Next.js Discord

Discord Forum

SSR in CRA?

Unanswered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
I made my FE using CRA and BE is on flask.
I wanted to improve my website's SEO, so i used react-helmet.
But I was thinking to do SSR and improve SEO further.

Is there any way I can do SSR in my current CRA project? or if I can try to mimic SSR? Or should i go for prerender instead of SSR?
(for some reason i can not migrate to next.js for now. Also got to know that CRA is deprecated now :P).

7 Replies

Rose-breasted Grosbeak
Depends on how it is hosted. If it's simple SPA hosting from hosting providers, it's likely not possible.
Dwarf CrocodileOP
I am using AWS
putting production build, and using gunicorn to run flask, on ec2
I am also using nginx
Rose-breasted Grosbeak
react 18/19 has better support for SSR, but IIRC, CRA doesn't support react 19. Try migrating to vite and using some plugin, otherwise, prerendering pages specifically for crawlers is the simplest
Dwarf CrocodileOP
But i am confused which one to use (option 1 or option 3).
Because I am using my nginx to do both, serving my SPA and as a reverse proxy.