/react-hot-boilerplate

Minimal live-editing boilerplate for your next ReactJS project

Primary LanguageJavaScriptMIT LicenseMIT

A Big Update Is Coming

React Hot Loader 3 is on the horizon, and you can try it today (boilerplate branch, upgrade example). It fixes some long-standing issues with both React Hot Loader and React Transform, and is intended as a replacement for both. The docs are not there yet, but they will be added before the final release. For now, this commit is a good reference.

React Hot Boilerplate

The minimal dev environment to enable live-editing React components.

Usage

npm install
npm start
open http://localhost:3000

Now edit src/App.js.
Your changes will appear without reloading the browser like in this video.

Linting

This boilerplate project includes React-friendly ESLint configuration.

npm run lint

Using 0.0.0.0 as Host

You may want to change the host in server.js and webpack.config.js from localhost to 0.0.0.0 to allow access from same WiFi network. This is not enabled by default because it is reported to cause problems on Windows. This may also be useful if you're using a VM.

Missing Features

This boilerplate is purposefully simple to show the minimal configuration for React Hot Loader. For a real project, you'll want to add a separate config for production with hot reloading disabled and minification enabled. You'll also want to add a router, styles and maybe combine dev server with an existing server. This is out of scope of this boilerplate, but you may want to look into other starter kits.

Dependencies

Resources