From b52c727937a499f3efdc5dceb74ae952aa318c3a Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 30 Apr 2016 18:00:43 +0100 Subject: [PATCH] Bump to 3.0.0-beta.0 --- package.json | 2 +- src/App.js | 7 +++++++ src/index.js | 11 +++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b8b4d514..14dec962 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "babel-preset-stage-0": "^6.0.15", "eslint": "^1.10.3", "eslint-plugin-react": "^3.6.2", - "react-hot-loader": "^3.0.0-alpha.13", + "react-hot-loader": "^3.0.0-beta.0", "webpack": "^1.12.2", "webpack-dev-server": "^1.12.1" }, diff --git a/src/App.js b/src/App.js index 0f563e07..74dd398a 100644 --- a/src/App.js +++ b/src/App.js @@ -2,6 +2,13 @@ import React, { Component } from 'react'; import Layout from './Layout'; import Counter from './Counter'; +// If you use React Router, make this component +// render with your routes. Currently, +// only synchronous routes are hot reloaded, and +// you will see a warning from on every reload. +// You can ignore this warning. For details, see: +// https://github.com/reactjs/react-router/issues/2182 + export default class App extends Component { render() { return ( diff --git a/src/index.js b/src/index.js index 80b7f9e0..f69dc2fb 100644 --- a/src/index.js +++ b/src/index.js @@ -5,14 +5,21 @@ import App from './App'; const rootEl = document.getElementById('root'); ReactDOM.render( - , + + + , rootEl ); if (module.hot) { module.hot.accept('./App', () => { + // If you use Webpack 2 in ES modules mode, you can + // use here rather than require() a . + const NextApp = require('./App').default; ReactDOM.render( - , + + + , rootEl ); });