GithubHelp home page GithubHelp logo

alexxnica / react-hot-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gaearon/react-hot-boilerplate

0.0 1.0 0.0 127 KB

Minimal live-editing example for React

License: MIT License

HTML 11.20% JavaScript 88.80%

react-hot-boilerplate's Introduction

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.

⚠️⚠️⚠️ This Is Experimental and Incomplete! ⚠️⚠️⚠️

This is not a good starting point for people learning React.
It’s experimental and completely lacks any production features.

Do not use this as an actual project boilerplate!
If you’re just getting started with React, use Create React App instead.

Usage

git clone https://github.com/gaearon/react-hot-boilerplate.git
cd react-hot-boilerplate/
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.

WebStorm

Because the WebStorm IDE uses "safe writes" by default, Webpack's file-watcher won't recognize file changes, so hot-loading won't work. To fix this, disable "safe write" in WebStorm.

Dependencies

Resources

react-hot-boilerplate's People

Contributors

gaearon avatar werme avatar calesce avatar liamondrop avatar adam-beck avatar asimpson avatar alexkval avatar andrewraycode avatar denysdovhan avatar darthdeus avatar alexkuz avatar lancefisher avatar vieiralucas avatar michaelbenin avatar ncuillery avatar technopahadi avatar vaclavsir avatar hulufei avatar sd0s avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.