/reactapp

Primary LanguageJavaScriptMIT LicenseMIT

React App Boilerplate

NPM Commands

npm start

Start the dev server at port 9000

npm test

Run unit tests once and pusblish coverable report on CLI

npm test -u

  • Create missing snapshots
  • Wpdate exising ones
  • Run unit tests once
  • Pusblish coverable report on CLI

npm build

Create production build

npm run std

Check source code with standardjs rules

npm run fmt

Reformat source code with standardjs rules

npm run storybook

Start storybook server

Editor Setting

  • .editorconfig
  • .vscode config

Development

  • Webpack
  • Hot Reloading
  • UglifyJS
  • Babel
  • Static Type Checking using Flow
  • Automtic Runtime Type Check generation
  • Container & Component resolve
  • historyApiFallback for webpack dev server
  • babel-polyfill for async-await
  • Dynamic import
  • Code splitting
  • React loadable
  • react helmet
  • react-redux
  • redux-devtools-extension
  • standardjs and prettier
  • Offline first PWA
  • Save redux state

Test

Tools

  • Jest
  • Request Animation Frame fix
  • Enzyme
  • Enzyme React 16 Adapter
  • Code Coverage
  • Storybook
  • Documentation

Example

Test type

  • Snapshot test
  • Rendering Test
  • Behaviour Test
  • Integration Test
  • System Test

Component type

  • Pure Component
  • Container Component
  • Container / View Pattern
  • Container / Branch / View Pattern
  • HOC
  • Branching Higher Order Components
  • Render Props
  • Provider Pattern