GitHub issues GitHub last commit Build Status Analytics Greenkeeper badge

React Template

Opinionated React starter template using Redux, React Router, Redux Saga and more.

Dependencies

In order to use this setup you need to have installed the following dependencies:

  1. Node - min v8.9.4
  2. NPM - min v5.6.0 or
  3. Yarn - min v1.3.2
  4. Bash terminal (Default on OSX/Linux, GitBash or similar on Windows)

Download

You can download this setup directly and extract it.

Then navigate to the react-template folder and proceed with the rest of the instructions.

Install

yarn

or

npm i

Develop

yarn start

or

npm start

Build

yarn build

or

npm run build

Details

JS

  1. Folder structure:

    • components/
      • generic/
      • pages/
      • App.js
    • constants/
    • store/
      • modules/
        • ...
      • sagas/
        • ...
        • index.js
    • utilities/
      • ...
    • bootstrap.js
  2. Latest EcmaScript support

    • Usage of the latest features in EcmaScript
    • Using Babel to transpile to ES5
    • Minification of the bundled file
    • Source maps
  3. Webpack aliases:

    • _sagas: 'src/js/store/sagas'
    • _store: 'src/js/store'
    • _styles: 'src/styles'
    • _images: 'src/images'
    • _utilities: 'src/js/utilities'
    • _constants: 'src/js/constants'
    • _components: 'src/js/components'

CSS

  1. SASS stylesheets preprocessing

  2. PostCSS stylesheets postprocessing including:

Assets

Images, Fonts, etc should be placed inside the src folder.

The src/index.html file is the template file for the HTML of the app. It can be used to add meta, link, script tags, etc.

The bundled stylesheet and javascript files are automatically inserted by Webpack.

Supported Browsers

This setup uses Browserslist to target browsers.

The default list of supported browsers is listed in the package.json file:

{
	"browserslist": ["> 1%", "last 2 versions"]
}

This means that supported browsers vary based on current usage data and current browser versions.

In general, this setup supports the two most recent versions of all browsers.

LICENSE

MIT