React js boilerplate is to help you kick start your react web application, with all bundling and build configured for you.
yarnornpm installyarn build:watchto build all files intodistfolder and watch for any changesyarn start:serverto start node development server and hostdistfolder browsehttp://localhost:8080/yarn json-serverto create test json apihttp://localhost:3001/
- ES6 Features
- React Redux to maintain application state
- React 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's to start development, use
json-serverto have test data and test api ready for use
Webpack is the only tool used in this project for bundling project dependencies and build, copy files.
- babel-loader with
['es2015', 'react', 'stage-1']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