r/reactjs • u/sanzhar-dan • Sep 07 '18
SSR with Node.JS,React, React-router, Redux, create-react-app is a nightmare
Server side rendering with Node.JS can become cumbersome when it comes to create-react-app.
The thing is you have to deal with css imports, images and window object. There’s no framework/solutions that solves this problem out of the box. You should do it all by hand, but it costs a lot of time and effort.
The thing is most of my projects are written with create-react-app. No framework can solve my problem. It can only be solved by hand by using Babel and Node.JS API.
Here I am, trying to choose the best strategy that will make all of my projects, created with create-react-app , be rendered on the server side with react-router and Redux.
I don't want to migrate to next.js or any similar frameworks as it will cost a lot of time and code refactoring.
Have you ever faced that kind of problem? What would you suggest?
View all comments
Show parent comment
2
u/jaredpalmer Sep 09 '18
Razzle author here...Razzle is built for this exact use case. It has a nearly identical setup as CRA, but gives you SSR out of the box. However, you can also use Backpack (another project of mine) to SSR your CRA application. Spectrum.chat does the latter.