Simple Universal Boilerplate of Redux-First Router
For a demo/boilerplate that goes even farther make sure to check out the "DEMO". A lot more features and use-cases are covered there, but this boilerplate is the best place to start to learn the basics of RFR, especially if you're new to any of these things: SSR, Code Splitting, Express, APIs, Webpack and Redux in general.
git clone https://github.com/faceyspacey/redux-first-router-boilerplate
cd redux-first-router-boilerplate
yarn
yarn start
client code:
- src/configureStore.js
- src/routesMap.js - (the primary work of RFR)
- src/components/Switcher.js - (universal component concept)
- src/components/Sidebar.js - (look at the different ways to link + dispatch URL-aware actions)
server code:
- server/index.js
- server/render.js - (super simple thanks to webpack-flush-chunks from our "Universal" product line)
- server/configureStore.js - (observe how the matched route's thunk is awaited on)