A client-only boilerplate using React + Redux + Router5.
- Universal version of this boilerplate using hapi could be found here: universal-react-redux-hapi
- Electron version of this boilerplate could be found here: electron-react-redux-router5
- React Hot Loader
- For hot reloads.
- React
- For the UI.
- Radium + react-styling
- For inline styles, which works perfectly with server-side rendering and React's virtual DOM.
- React Helmet
- For changing
<title>
tag,<meta>
tags, etc in React.
- For changing
- Redux
- For managing app's state.
- Router5
- For routing.
- webpack
- For building client bundles.
- Babel6
- For transpiling ES6(ES2015), and ES7(ES2016).
- ESLint
- For linting.
- mocha, nock & power-assert
- For testing.
- power-assert supports async/await, which can be used with redux-promise
- express
- For production web server (serves static files)
Personally, I think Router5 is better for managing the
props
than React Router. NoReact.cloneElement
withthis.props.children
, no confusion with React'sprops
, etc.
First steps...
$ git clone https://github.com/nanopx/react-redux-router5.git MyApp
$ cd MyApp
$ npm install
Start development server
$ npm start
Start production server
$ NODE_ENV=production npm run build
$ NODE_ENV=production npm start
Linting
$ npm run lint
$ npm start
in development mode, will also lint your codes every time it builds.
Testing
$ npm test
MIT