React js boilerplate is to help you kick start your react web application, with all bundling and build configured for you.
yarnornpm installyarn start:devto build and watch for changes, also a dev server will start onhttp://localhost:8080/
yarn json-serverto create test json apihttp://localhost:3001/yarn lintto run eslint onsrcfolder and display code errors if anyyarn flowto run flow
- ES6 Features
- React Redux to maintain application state
- Redux Thunk to handle asynchronous actions
- axios to handle all api calls
['GET','POST','PUT','DELETE', ...] - React CSS Modules to be able to build modular CSS code for each React component.
- React Router v4 for routing between application pages
- Bootstrap v4 for grid system and all new bootstrap 4 features
- Svgo to make sure all your svg icons are optimized
- Node express based development server
- json-server no need to wait for backend api to start development, use
json-serverto have test data and test api ready for use - eslint the project contains eslint with
eslint-config-airbnbextended, to fix and flag javascript code errors. - flow static type checker for javascript
- husky to add
pre-commithook that will triggeryarn lint && yarn flowto make sure no bad commits are pushed
Webpack is the only tool used in this project for bundling project dependencies and build, copy files.
- babel-loader with
['es2015', 'react', 'stage-1', 'flow']presets for ES6 features and React JSX transpilation to ES5 understood by all browsers. - sass-loader Loads a Sass/SCSS file and compiles it to CSS
- css-loader interprets
@import/url()to js modules - postcss-loader to process CSS with PostCSS
- style-loader
- file-loader interprets
@import/url()to image files, to copy them todistfolder and return url for these images - svg-sprite-loader to add all your icons in one sprite.svg file and interpret
@importfrom javascript orurl()in css - svgo-loader to optimize svg before generating final sprite.svg
- uglifyjs-webpack-plugin for javascript minification
- copy-webpack-plugin used to copy
index.htmltodistfolder - extract-text-webpack-plugin extract final bundled css files to
distfolder - svg-sprite-loader/plugin part of
svg-sprite-loaderto generate finalsprite.svgindist - compression-webpack-plugin for gzip compression of scripts.js
You can use any prefered editor, in case you are using Atom the following packages can help speed up your development process: