I created this to be used as a template. Currently, I couldn't find a cra-template that met my needs. So I created this template with traditional webpack instead of create react app.
Its benefits are:
- SSR + CSR = Isomorphic React with ReactDOMServer and ReactDOM.hydrate
- Server Side Redux (which handles the intial redux state)
- Initially have Lighthouse 100 scores across the board (except PWA)
reyarqueza@rey-mac : ~/isomorphic-react-starter-kit
$ npm install
$ npm start
Open up 3 terminals and run the following npm scripts:
reyarqueza@rey-mac : ~/isomorphic-react-starter-kit
$ npm start
reyarqueza@rey-mac : ~/isomorphic-react-starter-kit
$ npm run client-side-react-dev
reyarqueza@rey-mac : ~/isomorphic-react-starter-kit
$ npm run sass-watch
To create a minified production build:
reyarqueza@rey-mac : ~/isomorphic-react-starter-kit
$ npm run build
- ReactDOMServer - https://reactjs.org/docs/react-dom-server.html
- ReactDOM.hydrate - https://reactjs.org/docs/react-dom.html#hydrate
- Redux Server Rendering - https://redux.js.org/recipes/server-rendering