It’s important to note here that, for React’s sake, what you render on the server (#2 above) needs to be identical to what is rendered on the client (#3). If not, React will throw a warning.
.render
.hydrate
Pass props to components
Render App with fetched data
Add routing
Add redux
Good unit-test:
- Repeatable
- Atomic
- Fast
- Isolated / Independent
- Descriptive
- well structured
Installation
npm install -D jest
npm install -D enzyme enzyme-adapter-react-16 enzyme-to-json
npm install -D redux-mock-store
Tesing
shallow, mount, render
mocks
simulate
Useful links
https://github.com/redux-saga/redux-saga
https://facebook.github.io/immutable-js/
https://github.com/reduxjs/reselect
https://github.com/acdlite/recompose
https://github.com/yuliaHope/ssr-test-example
https://newsapi.org/