Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Hot Loader 3 #240

Merged
merged 183 commits into from
Feb 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
cc6d4aa
2.0.0-alpha
gaearon Aug 23, 2015
5c8e2b5
Fix a weird descriptor problem
gaearon Aug 23, 2015
3bacf50
2.0.0-alpha-1
gaearon Aug 23, 2015
794beb0
Enforce a newer version of React Hot API
gaearon Aug 24, 2015
ff5430d
2.0.0-alpha-2
gaearon Aug 24, 2015
34b2985
2.0.0-alpha-3
gaearon Aug 27, 2015
429f5ba
Merge with master
gaearon Aug 28, 2015
4d5acbf
2.0.0-alpha-4
gaearon Aug 28, 2015
8a92ef0
Rewrite with a different approach
gaearon Apr 17, 2016
985426b
3.0.0-alpha.0
gaearon Apr 17, 2016
9905408
Add AppContainer
gaearon Apr 17, 2016
eed72e8
3.0.0-alpha.1
gaearon Apr 17, 2016
f1234e5
Kill old module
gaearon Apr 17, 2016
ae896b0
Refactor and move files
gaearon Apr 17, 2016
af0dd19
Update CHANGELOG.md
gaearon Apr 17, 2016
cce9055
Add build process with Babel
gaearon Apr 17, 2016
030dcb2
Bring back react-hot-loader/patch and add feature testing for it
gaearon Apr 17, 2016
b831771
Add scaffold for the Babel plugin
gaearon Apr 17, 2016
5c69604
Add Babel plugin
gaearon Apr 18, 2016
a26dbc9
3.0.0-alpha.2
gaearon Apr 18, 2016
bb8db7b
Add missing file
gaearon Apr 18, 2016
273a424
3.0.0-alpha.3
gaearon Apr 18, 2016
47042fb
Add a few friendly errors
gaearon Apr 18, 2016
b05646e
3.0.0-alpha.4
gaearon Apr 18, 2016
a1ac86c
Better error messages
gaearon Apr 18, 2016
16b26f6
3.0.0-alpha.5
gaearon Apr 18, 2016
ea3288b
Disable in production
gaearon Apr 18, 2016
2509a5e
3.0.0-alpha.6
gaearon Apr 18, 2016
f32de87
Tweak errors again
gaearon Apr 18, 2016
29085b3
3.0.0-alpha.7
gaearon Apr 18, 2016
520dc19
I heard you like props
gaearon Apr 18, 2016
13c1a5a
3.0.0-alpha.8
gaearon Apr 18, 2016
68b9f02
Style tweak
gaearon Apr 18, 2016
8bdeaa0
Work around https://phabricator.babeljs.io/T7298
gaearon Apr 18, 2016
e6e74a3
3.0.0-alpha.9
gaearon Apr 18, 2016
4acd85c
Warn and bail out when __source appears out of the blue
gaearon Apr 18, 2016
3c1238f
3.0.0-alpha.10
gaearon Apr 18, 2016
48b2382
Don't update proxy to the same type twice
gaearon Apr 18, 2016
ce34ca0
3.0.0-alpha.11
gaearon Apr 18, 2016
07cf737
Add comments
gaearon Apr 18, 2016
005c32d
Add a hack for React Router
gaearon Apr 18, 2016
43de47e
3.0.0-alpha.12
gaearon Apr 18, 2016
deb8794
Closes #244.
Apr 19, 2016
003548e
Cleaning up stuff per Dan's comments.
Apr 19, 2016
feb6549
Updated message and check type in componentWillReceiveProps.
Apr 20, 2016
ed61d7b
Update AppContainer.prod
Apr 20, 2016
8ad9172
Updated PropType warning.
Apr 20, 2016
531f8a5
Fix hack for React Router to handle also IndexRoute
zywyz Apr 21, 2016
1d00b08
Merge pull request #252 from zywyz/patchFix
gaearon Apr 21, 2016
4e2c4ac
Removed starter kits from docs/README.md
hedgerh Apr 22, 2016
84a1f5a
Removed old documentation.
hedgerh Apr 22, 2016
5d551eb
Migration guide. Announcement on main README
hedgerh Apr 22, 2016
eec6532
Cleaned up the top of README.md
hedgerh Apr 22, 2016
9c97785
Modify react router hack to operate on `Router` instead of `Route` el…
alexanderchr Apr 21, 2016
9abd7f4
Extend react router hack to handle routes with multiple components
alexanderchr Apr 22, 2016
e4b609e
Split resolveType and react router hack into separate files
alexanderchr Apr 24, 2016
317b5c4
Refactor router hack to be more testable
alexanderchr Apr 24, 2016
cdd8c6d
Add tests for react router hack
alexanderchr Apr 24, 2016
4a96dbe
Add old API for backwards compatibility.
Apr 25, 2016
f2a21ab
Refactor react router hack more
alexanderchr Apr 24, 2016
4874470
Rename hackRouter -> fixupReactRouter
alexanderchr Apr 24, 2016
ceb05d4
Expose isReactRouterish and use it directly in patch
alexanderchr Apr 25, 2016
ee77518
Update compat for AppContainer.prod.js.
Apr 25, 2016
b29375c
docs: early draft
gadicc Apr 25, 2016
27bd7e0
fix broken render statements
gadicc Apr 25, 2016
8ab36b5
fix closing parenthesis on require statements
gadicc Apr 26, 2016
d0634a4
require().default for ES6 modules
gadicc Apr 26, 2016
e043b10
Adding additional clarification to RHL3 docs along with JSX highlight…
Apr 26, 2016
77dd1db
Updating syntax in example(s) to be consistent ES6
Apr 26, 2016
1296c3f
Merge pull request #258 from tsaiDavid/next-docs
gadicc Apr 26, 2016
1a7f493
restore original README so we can cleanly merge in hedgerh's changes
gadicc Apr 26, 2016
5edf7bd
Merge remote-tracking branch 'hedgerh/docs-migration' into next-docs
gadicc Apr 26, 2016
ee4f18d
Add Tips & Tricks doc
gadicc Apr 26, 2016
aae66bf
Add backwards compat in prod.
Apr 27, 2016
80e7b66
Refactor and add more tests
gaearon Apr 28, 2016
b7cca0f
3.0.0-alpha.13
gaearon Apr 28, 2016
dea8cf9
Merge remote-tracking branch 'lolJS/next' into next
gaearon Apr 30, 2016
a53f3a7
Fix backward compat for children prop
gaearon Apr 30, 2016
b11621b
Ensure we emit semis before and after generated code
gaearon Apr 30, 2016
146f8d5
3.0.0-beta.0
gaearon Apr 30, 2016
dcf836f
added AppContainer test
Apr 30, 2016
792da59
Merge pull request #269 from nfcampos/next
gaearon May 1, 2016
2a1e384
fixed force update for AppContainer children
May 1, 2016
aa80800
More tests for AppContainer (#273)
nfcampos May 1, 2016
6522b76
Bump React dep
gaearon May 1, 2016
55de8a0
(WIP) Get rid of _source
gaearon May 1, 2016
fa2b745
Add global dep and fix Babel tests
gaearon May 1, 2016
015c21e
Remove React Router workaround as unnecessary
gaearon May 1, 2016
7178f26
Get tests to pass
gaearon May 1, 2016
5444118
Add rudimentary test for resolveType
gaearon May 1, 2016
1804da8
Test resolveType() more thoroughly
gaearon May 2, 2016
0371b62
Consolidate logic and add more tests
gaearon May 2, 2016
b5fff25
Tweak registration API
gaearon May 2, 2016
3b9bd93
Fix Babel plugin
gaearon May 2, 2016
bb83340
Handle late registrations
gaearon May 2, 2016
7610fd6
Fix Webpack loader
gaearon May 2, 2016
e41e117
Add support for cached elements
gaearon May 2, 2016
f3c5d17
Fix test watching
gaearon May 2, 2016
730aadd
Make WeakMap optional
gaearon May 2, 2016
0bea541
Merge pull request #272 from gaearon/fix-everything
gaearon May 2, 2016
6b5d7cf
3.0.0-beta.1
gaearon May 2, 2016
3943b5d
added travis.yml
May 2, 2016
f9d88c9
added test case for createClass and createFactory
May 2, 2016
b20f36d
added tests for rendering cached never-rendered elements
May 2, 2016
750afd7
Merge pull request #278 from gaearon/bug-276
nfcampos May 2, 2016
f60df13
added eslint
May 2, 2016
a268ad6
fixed most of the eslint errors
May 2, 2016
2926afc
added run lint to travis
May 2, 2016
e4c1b81
jsx double quotes
May 2, 2016
b8e81fb
fixed some more
May 2, 2016
6f2c583
consoleErrorReporter: correct error proptype & npm i redbox-react
gadicc May 3, 2016
13f7322
finished linting all the files
May 3, 2016
49a9133
fix error message spacing
May 3, 2016
0ed3719
Merge pull request #280 from gaearon/eslint
nfcampos May 4, 2016
2482e32
Fixed typo this.props.prop -> this.props.props (#285)
leidegre May 4, 2016
a7191b5
remove eslint comments from output of webpack loader
May 4, 2016
ad50110
patch createFactory
May 4, 2016
0e110e7
Merge pull request #287 from gaearon/fix-create-factory
gaearon May 5, 2016
62881d9
3.0.0-beta.2
gaearon May 5, 2016
df188ba
bumped redbox-react dependency
capaj May 19, 2016
71abb63
Change `NODE_ENV === production` to `module.hot`
meyer May 23, 2016
c28bfa2
Make requested changes
meyer May 23, 2016
47d53e6
Fix redbox require and add test
nathanmarks Jun 29, 2016
019cd08
enable stage-1 transforms and add babel-eslint
calesce Jul 13, 2016
c07dcb0
Add a passing test showing that component class methods get replaced
calesce Jul 13, 2016
40e5e36
extend the existing babel plugin to transform class property arrow fu…
calesce Jul 13, 2016
2e957fa
support arrow functions without block statement bodies, and add match…
calesce Jul 14, 2016
61c0fa9
only copy the parameter identifier on the class
calesce Jul 27, 2016
b4e6dd0
move test into its proper `describe()` block
calesce Jul 27, 2016
f474b69
for the class properties transform,
calesce Jul 27, 2016
caf6d51
Change class property transform to use rest params/spread operator
calesce Jul 27, 2016
26f4c14
Fixing the broken V3 example in the docs
jameskraus Aug 23, 2016
123d940
Merge pull request #349 from jameskraus/next-docs
calesce Sep 3, 2016
6e7eee7
Merge pull request #314 from nathanmarks/fix-redbox-require
calesce Sep 3, 2016
bb7dec3
Merge pull request #299 from capaj/patch-1
calesce Sep 3, 2016
1744629
Merge pull request #302 from meyer/next
calesce Sep 3, 2016
ffb5155
3.0.0-beta.3
calesce Sep 3, 2016
752e32d
Bump stage-1 dependency to stage-2
calesce Sep 7, 2016
669b9a5
Remove unneeded transforms from babel plugin tests
calesce Sep 7, 2016
698d592
extend AppContainer class property tests
calesce Sep 7, 2016
28e9332
update stage-1 references to stage-2
calesce Sep 7, 2016
02b1e6d
Fix the import of a component from a component with the same base nam…
tanguylebarzic Sep 14, 2016
7c78ec8
opt out of class properties transpile on use of arguments, new.target…
Sep 14, 2016
43cb67e
Merge pull request #1 from nfcampos/class-props-fix
calesce Sep 14, 2016
ed84f63
Merge pull request #322 from calesce/class-properties
calesce Sep 15, 2016
bc263de
3.0.0-beta.4
calesce Sep 15, 2016
2ee9e97
fix async arrow functions
jquense Sep 20, 2016
1058ad9
Prevent the Babel plugin from breaking the output of babel-node (#374)
calesce Sep 22, 2016
1df6650
add async arrow class property test with expression body
calesce Sep 22, 2016
38781b3
update tests
calesce Sep 22, 2016
1fe91c8
Merge pull request #372 from jquense/fix-async-arrow-func
calesce Sep 22, 2016
3f97daf
3.0.0-beta.5
calesce Sep 22, 2016
794c02b
Update CHANGELOG.md
calesce Sep 22, 2016
4f34665
more passing tests for class properties transform
nfcampos Sep 26, 2016
46b0d31
added tests for class props with same name as class method
nfcampos Sep 26, 2016
12f3fdd
added failing test for static class properties
nfcampos Sep 26, 2016
44f9902
opt out of class property transform for static class properties
nfcampos Sep 26, 2016
4e91299
added babel-plugin-syntax-async-functions to babelrc of async functio…
Oct 5, 2016
8fab49e
add babel-plugin-transform-class-properties to class-properties babel…
nfcampos Oct 7, 2016
b4de995
Use production patch/AppContainer if no module.hot
calesce Oct 14, 2016
03687ec
3.0.0-beta.6
calesce Oct 14, 2016
284269f
update CHANGELOG.md
calesce Oct 14, 2016
574a410
Add "Known Limitations" doc
calesce Oct 19, 2016
142201d
Add System.import section on known limitations
calesce Oct 19, 2016
644d4f3
Merge pull request #402 from calesce/known-limitations
hedgerh Oct 19, 2016
475049f
Remove deprecations from AppContainer
calesce Oct 26, 2016
2ce0b3c
add Node >= 4 to package.json "engines"
calesce Oct 27, 2016
9da8e84
document migrating from create-react-app
calesce Oct 31, 2016
d2706c6
Update README.md
calesce Nov 2, 2016
61582ed
update Known Limitations doc
calesce Nov 5, 2016
8365f09
Update README.md
calesce Nov 12, 2016
d360e3a
Merge pull request #257 from gaearon/next-docs
calesce Nov 20, 2016
51dae3f
Add environment-specific importing for index.js
calesce Nov 27, 2016
7eeceab
Add typescript note to README (#478)
danzel Feb 11, 2017
0b79d09
Merge branch 'master' into next
wkwiatek Feb 20, 2017
c2d94eb
Merge branch 'master' into next
wkwiatek Feb 20, 2017
6606942
Improve docs installation steps
wkwiatek Feb 22, 2017
c327cd3
Workaround reference error when using async arrow functions in code (…
wkwiatek Feb 22, 2017
be4a785
Add example into docs for patch order. Mention webpack guide in docs.
wkwiatek Feb 23, 2017
9fa3350
Add starter kits
wkwiatek Feb 24, 2017
29016a6
Changes in docs tutorial
wkwiatek Feb 24, 2017
e78c134
Merge pull request #487 from gaearon/next-docs
calesce Feb 26, 2017
460b39a
Add beta to name in readme
wkwiatek Feb 27, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015", "react", "stage-2"]
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test/babel/fixtures
lib
12 changes: 12 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "airbnb",
"parser": "babel-eslint",
"rules": {
"no-underscore-dangle": ["error", { "allow": ["__REACT_HOT_LOADER__"] }],
"no-console": ["error", { allow: ["error"] }],
"strict": 0,
},
globals: {
"__REACT_HOT_LOADER__": true
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
lib
.DS_Store
6 changes: 0 additions & 6 deletions .jshintrc

This file was deleted.

7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js:
- "5"
- "6"
script:
- npm run lint
- npm test
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,79 @@
## Changelog

### 3.0.0-beta.6

* Use production versions of `patch` and `AppContainer` if no `module.hot` available, so it doesn't break people using `NODE_ENV=test`. (#398)
* Opt out of transforming static class properties. (#381)

### 3.0.0-beta.5

* Makes the class properties portion of the Babel plugin work with async functions. (#372)
* Change the output of the tagger code in the Babel plugin so that it doesn't break the output of `babel-node`. (#374)

### 3.0.0-beta.4

* Extends the Babel plugin to enable hot reloading of class properties. (#322)
* Fixes a bug in the Webpack loader from a component importing a module with the same basename. (#347)

### 3.0.0-beta.3

* Fixes broken import of RedBox, which led to confusing stack traces when applications threw errors. (#314)
* Add `module.hot` checks to conditional `require()`s to remove unnecessary warnings when using server rendering. (#302)

### 3.0.0-beta.2

* Patch `React.createFactory` (#287)
* Fix props typo (#285)

### 3.0.0-beta.1

* Adds complete React Router support. Async routes should work fine now. (#272)
* Fixes a nasty bug which caused unwrapped component to render. (#266, #272)
* Fixes an issue that caused components with `shouldComponentUpdate` optimizations not getting redrawn (#269, 2a1e384d54e1919117f70f75dd20ad2490b1d9f5)
* Internal: a rewrite and much better test coverage.

### 3.0.0-beta.0

* Fixes an issue when used in Webpack 2 (https://github.com/gaearon/react-hot-loader/issues/263)
* **Breaking change:** instead of

```js
<AppContainer component={App} props={{ prop: val }} />
```

you now need to write

```js
<AppContainer>
<App prop={val} />
</AppContainer>
```

(#250)

**See [this commit](https://github.com/gaearon/react-hot-boilerplate/commit/b52c727937a499f3efdc5dceb74ae952aa318c3a) as an update reference!**

### 3.0.0-alpha

Big changes both to internals and usage. No docs yet but you can look at https://github.com/gaearon/react-hot-boilerplate/pull/61 for an example.

### 2.0.0-alpha

**Experimental release that isn't really representative on what will go in 2.0, but uses the new engine.**

Some ideas of what should be possible with the new engine:

* There is no requirement to pass `getRootInstances()` anymore, so React Hot Loader doesn't need `react/lib/ReactMount` or walk the tree, which was somewhat fragile and changing between versions
* Static methods and properties are now hot-reloaded
* Instance getters and setters are now hot reloaded
* Static getters and setters are now hot reloaded
* Deleted instance methods are now deleted during hot reloading
* Single method form of [autobind-decorator](https://github.com/andreypopp/autobind-decorator) is now supported

What might get broken:

* We no longer overwrite or even touch the original class. Every time makeHot is invoked, it will return a special proxy class. This means a caveat: for example, static methods will only be hot-reloaded if you refer to them as `this.constructor.doSomething()` instead of `FooBar.doSomething()`. This is because React Hot Loader calls `makeHot` right before exporting, so `FooBar` still refers to the original class. Similarly, `this.constructor === App` will be `false` inside `App` unless you call `App = makeHot(App)` manually, which you can't do with React Hot Loader. **I'm not sure how much of a problem this will be, so let me know if it pains you.** In the longer term, we will deprecate React Hot Loader in favor of a Babel plugin which will be able to rewrite class definitions correctly, so it shouldn't be a problem for a long time. If there is demand, we can introduce a mode that rewrites passed classes, too.

### 1.3.1

* Fix import for ReactMount to support 15.4.0 (**[#430](https://github.com/gaearon/react-hot-loader/pull/430)**)
Expand Down
7 changes: 0 additions & 7 deletions Injection.js

This file was deleted.

50 changes: 28 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,51 @@
>## A Big Update Is Coming
# React Hot Loader 3 [![npm package](https://img.shields.io/npm/v/react-hot-loader.svg?style=flat-square)](https://www.npmjs.org/package/react-hot-loader)

>React Hot Loader 3 is [on the horizon](https://github.com/gaearon/react-hot-loader/pull/240), and you can try it today ([boilerplate branch](https://github.com/gaearon/react-hot-boilerplate/pull/61), [upgrade example](https://github.com/gaearon/redux-devtools/commit/64f58b7010a1b2a71ad16716eb37ac1031f93915)). It fixes some [long-standing issues](https://twitter.com/dan_abramov/status/722040946075045888) with both React Hot Loader and React Transform, and is intended as a replacement for both. The docs are not there yet, but you can view a getting starting guide on [the README on the `next` branch](https://github.com/gaearon/react-hot-loader/tree/next/docs). You can install RHL3 using `npm install --save-dev react-hot-loader@next`
### React Hot Loader 3 beta has arrived!

# 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)
It fixes some long-standing issues with both React Hot Loader and React Transform.

This is a **stable for daily use in development** implementation of [React live code editing](https://www.youtube.com/watch?v=pw4fKkyPPg8).
**It is intended as a replacement for both.**

* Get inspired by a **[demo video](https://vimeo.com/100010922)** and **[try the live demo](http://gaearon.github.io/react-hot-loader/)**.
Some nice things about it:

* Read **[the integration walkthrough](http://gaearon.github.io/react-hot-loader/getstarted/).**
* Editing functional components preserves state
* Works great with higher order components
* Requires little configuration
* Automatically disabled in production
* Works with or without Babel (you can remove `react-hot-loader/babel` from `.babelrc` and instead add `react-hot-loader/webpack` to `loaders`)

* Use **[one of the starter kits](https://github.com/gaearon/react-hot-loader/tree/master/docs#starter-kits)** for your next React project.

## The Talk

React Hot Loader was demoed together with **[Redux](https://github.com/gaearon/redux)** at React Europe.
Watch **[Dan Abramov's talk on Hot Reloading with Time Travel](https://www.youtube.com/watch?v=xsSnOQynTHs).**
Check out [the Migration to 3.0 guide](https://github.com/gaearon/react-hot-loader/tree/master/docs#migration-to-30) to learn how to migrate your app to 3.0.

## Installation

`npm install --save-dev react-hot-loader`
`npm install --save-dev react-hot-loader@next`

## Usage

If 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.
If 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)**.

Provided by owner and collaborators:
- **[React Hot Boilerplate](https://github.com/gaearon/react-hot-boilerplate/tree/next)**
- **[React Hot Loader Minimal Boilerplate](https://github.com/wkwiatek/react-hot-loader-minimal-boilerplate)**

To use React Hot Loader in an existing project, you need to

* switch to Webpack for builds (instead of RequireJS or Browserify);
* enable Hot Module Replacement, which is a Webpack feature;
* configure Webpack to use React Hot Loader for JS or JSX files.

These steps are covered by **[the walkthrough](http://gaearon.github.io/react-hot-loader/getstarted/)**.
These steps are covered by **[the Migration to 3.0 guide](https://github.com/gaearon/react-hot-loader/tree/master/docs#migration-to-30)**.

If you'd rather stay with **Browserify**, check out **[LiveReactload](https://github.com/milankinen/livereactload)** by Matti Lankinen.

## Flux
## Known limitations

**[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.
- React Router v3 is not fully supported (e.g. async routes). If you want to get most of React Hot Loader, consider switching to [React Router v4](https://reacttraining.com/react-router/) (Note: it's currently in beta!). If you want to understand the reasoning, it's good to start in [React Router v4 FAQ](https://github.com/ReactTraining/react-router/blob/v4/README.md#v4-faq)

## The Talk

React Hot Loader was demoed together with **[Redux](https://github.com/gaearon/redux)** at React Europe.
Watch **[Dan Abramov's talk on Hot Reloading with Time Travel](https://www.youtube.com/watch?v=xsSnOQynTHs).**

## React Native

Expand All @@ -49,11 +57,9 @@ If something doesn't work, in 99% cases it's a configuration issue. A missing op

## Documentation

Docs 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.

If 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)**.
Check out the [docs directory](docs).

If 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)**.
You can also check out a great [webpack guide to React hot module replacement](https://webpack.js.org/guides/hmr-react/).

## Got Questions?

Expand All @@ -63,7 +69,7 @@ Watch the repo to stay tuned!

## Patrons

The work on React Hot Loader, [React Transform](https://github.com/gaearon/babel-plugin-react-transform), [Redux](https://github.com/reactjs/redux), and related projects was [funded by the community](https://www.patreon.com/reactdx).
The work on React Hot Loader, [React Transform](https://github.com/gaearon/babel-plugin-react-transform), [Redux](https://github.com/reactjs/redux), and related projects was [funded by the community](https://www.patreon.com/reactdx).
Meet some of the outstanding companies that made it possible:

* [Webflow](https://github.com/webflow)
Expand Down
41 changes: 0 additions & 41 deletions RootInstanceProvider.js

This file was deleted.

1 change: 1 addition & 0 deletions babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./lib/babel');
62 changes: 62 additions & 0 deletions docs/Known Limitations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
## Known Limitations

### Code Splitting
If you want to use Webpack code splitting via `require.ensure`, you'll need to add an additional `module.hot.accept` callback within the `require.ensure` block, like this:

```js
require.ensure([], (require) => {
if (module.hot) {
module.hot.accept('../components/App', () => {
loadComponent(require('../components/App').default);
})
}
loadComponent(require('../components/App').default);
});
```

Note that if you're using React Router (pre-4.0), this will only work with `getChildRoutes`, but not `getComponent`, since `getComponent`'s callback will only load a component once.

Also, if you're using the Webpack 2 beta, you can use `System.import` without extra `module.hot.accept` calls, although there are still a [few issues with it](https://github.com/gaearon/react-hot-loader/issues/303).

### Checking Element `type`s
Because React Hot Loader creates proxied versions of your components, comparing reference types of elements won't work:

```jsx
const element = <Component />;
console.log(element.type === Component); // false
```

One workaround is to create an element (that will have the `type` of the proxied component):

```jsx
const ComponentType = (<Component />).type;
const element = <Component />;
console.log(element.type === ComponentType); // true
```

You can also set a property on the component class:

```jsx
const Widget = () => <div>hi</div>;
Widget.isWidgetType = true;
console.log(<Widget />.type.isWidgetType); // true
```

### Reassigning Components
React Hot Loader will only try to reload the original component reference, so if you reassign it to another variable like this:

```jsx
let App = () => (<div>hello</div>);
App = connect()(App);
export default App;
```

React Hot Loader won't reload it. Instead, you'll need to define it once:

```jsx
const App = () => (<div>hello</div>);
export default connect()(App);
```

### Decorators
Components that are decorated (using something like [`@autobind`](https://github.com/andreypopp/autobind-decorator)) currently do not retain state when being hot-reloaded. (see [#279](https://github.com/gaearon/react-hot-loader/issues/279))
Loading