UNPKG

3.68 kBMarkdownView Raw
1# React Hot Loader [![npm package](https://img.shields.io/npm/v/react-hot-loader.svg?style=flat-square)](https://www.npmjs.org/package/react-hot-loader)
2
3This is a **stable for daily use in development** implementation of [React live code editing](http://www.youtube.com/watch?v=pw4fKkyPPg8).
4
5* Get inspired by a **[demo video](https://vimeo.com/100010922)** and **[try the live demo](http://gaearon.github.io/react-hot-loader/)**.
6
7* Read **[the integration walkthrough](http://gaearon.github.io/react-hot-loader/getstarted/).**
8
9* Use **[one of the starter kits](https://github.com/gaearon/react-hot-loader/tree/master/docs#starter-kits)** for your next React project.
10
11## The Talk
12
13React Hot Loader was demoed together with **[Redux](https://github.com/gaearon/redux)** at React Europe.
14Watch **[Dan Abramov's talk on Hot Reloading with Time Travel](https://www.youtube.com/watch?v=xsSnOQynTHs).**
15
16## Installation
17
18`npm install --save-dev react-hot-loader`
19
20## Usage
21
22If you want to try hot reloading in a new project, try **[one of the starter kits](https://github.com/gaearon/react-hot-loader/tree/master/docs#starter-kits)**, **[React Hot Boilerplate](https://github.com/gaearon/react-hot-boilerplate)** being the most minimal one.
23
24To use React Hot Loader in an existing project, you need to
25
26* switch to Webpack for builds (instead of RequireJS or Browserify);
27* enable Hot Module Replacement, which is a Webpack feature;
28* configure Webpack to use React Hot Loader for JS or JSX files.
29
30These steps are covered by **[the walkthrough](http://gaearon.github.io/react-hot-loader/getstarted/)**.
31
32If you'd rather stay with **Browserify**, check out **[LiveReactload](https://github.com/milankinen/livereactload)** by Matti Lankinen.
33
34## Flux
35
36**[Redux](https://github.com/gaearon/redux)** is a Flux implementation that supports hot reloading of everything out of the box. Read **[The Evolution of Flux Frameworks](https://medium.com/@dan_abramov/the-evolution-of-flux-frameworks-6c16ad26bb31)** for some context around its creation.
37
38## React Native
39
40You can use React Hot Loader to tweak a React Native application. Check out **[react-native-webpack-server](https://github.com/mjohnston/react-native-webpack-server)** by Michael Johnston.
41
42## Troubleshooting
43
44If something doesn't work, in 99% cases it's a configuration issue. A missing option, a wrong path or port. Webpack is very strict about configuration, and the best way to find out what's wrong is to compare your project to an already working setup, such as **[React Hot Boilerplate](https://github.com/gaearon/react-hot-boilerplate)**, bit by bit. We're also gathering **[Troubleshooting Recipes](https://github.com/gaearon/react-hot-loader/blob/master/docs/Troubleshooting.md)** so send a PR if you have a lesson to share!
45
46## Documentation
47
48Docs are in a bit of a flux right now because I'm in the process of updating everything to document the major 1.0 release.
49
50If you just learned about React Hot Loader and want to find out more, **[check out the walkthrough](http://gaearon.github.io/react-hot-loader/getstarted/)** and then try one of the **[starter kits](https://github.com/gaearon/react-hot-loader/tree/master/docs#starter-kits)**.
51
52If you've been with us for a while, read **[1.0 release notes and migration guide](https://github.com/gaearon/react-hot-loader/blob/master/docs/README.md#migrating-to-10)**.
53
54## Got Questions?
55
56[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gaearon/react-hot-loader?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
57
58Watch the repo to stay tuned!
59
60## License
61
62MIT (http://www.opensource.org/licenses/mit-license.php)