This is the v2.1 version of my react app, checkout my article here: https://medium.com/@benlu/ssr-with-create-react-app-v2-1-ee83fb767327
yarn install
yarn build
yarn start:prod:server
This just runs create react app, its great!
yarn start
- In development, you can't run server rendering. So to use server rendering, you have to run a build, making sure all the files are in the correct place before actually being able to view server side code
- You need to run Create React App + Server seperately, especially for database related things, you need both, I could run concurrently, however, I like the nice output and followability you get from two seperate run processes
- A lot of code is repeated or just kinda messy. There's a lot of states, and these need to be handled both server side and client side so they're duplicated.