react-hmr
The AMD wrapper of react-hot-loader@next for react HMR
How to use
Install
npm install react-hmr --save-dev
Usage
-
DEV ENV
-
Preload
dist/react-hot-loader.dev.js
ordist/react-hot-loader.dev.min.js
compress version -
Update your React app entry code:
- import/require
patch
andAppContainer
as the React.Component proxy, thepatch
should execute before the app startup - use the
AppContainer
component wrap your app root component
;;;;;const store =name: 'react';ReactDOM; - import/require
-
-
PROD ENV
Like
DEV ENV
, except for preloaddist/react-hot-loader.prod.js
ordist/react-hot-loader.prod.min.js
compress version.
Reference
- react-hot-loader: the next version
- The next react-hot-loader upgrade example