Demo: http://react-redux-table.surge.sh
Features:
- React-Redux data flow
- Fetch JSON from an API and render into a table
- Filter and sort data in the table
- Routing with react-router 4+
- Redux middlewares
- Separate reducers and actions
- ES6/ES7 with babeljs (stage-0, react)
- Stylus
- Webpack 3+ dev and production
- Eslint standard
- Unit tests with mocha + chai
$ npm install
$ npm run dev # builds and hot reloads on changes
$ npm run build # builds production assets (transpile, minify, etc)
$ npm start # Start express server and serves index.html
To run a production version in docker:
$ docker build -t react-redux-example . # Build docker container
$ docker run -d --name react-redux-example -p 4000:4000 react-redux-example # Run docker container
App will be running at http://localhost:4000
$ docker stop react-redux-example # Stop container
$ npm run lint # Runs eslint
$ npm test # Runs mocha
$ npm run test:dev # Run mocha in watch mode
Data from USDA nutrient API