From 6326af3d6c4288ff1e8ca1e56542fcdce174bc5d Mon Sep 17 00:00:00 2001 From: Haishan Date: Mon, 24 Dec 2018 23:57:03 +0800 Subject: chore: re-enable react-hot-loader --- src/components/Root.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/components/Root.js') diff --git a/src/components/Root.js b/src/components/Root.js index dc96e22..e69e776 100644 --- a/src/components/Root.js +++ b/src/components/Root.js @@ -1,7 +1,7 @@ import React from 'react'; import { Provider } from 'm/store'; import { HashRouter as Router, Route } from 'react-router-dom'; -// import { hot } from 'react-hot-loader'; +import { hot } from 'react-hot-loader/root'; // import createHistory from 'history/createHashHistory'; // import createHistory from 'history/createBrowserHistory'; import ErrorBoundary from 'c/ErrorBoundary'; @@ -45,11 +45,4 @@ const Root = () => ( // // -// hot export Root -// https://github.com/gaearon/react-hot-loader/tree/v4.0.1#getting-started - -// RHL doesn't compatible with React Hook yet, see: -// https://github.com/gaearon/react-hot-loader/issues/1088 -// after it's working, uncommment below line and remove "//" in the babelrc -// export default hot(module)(Root); -export default Root; +export default hot(Root); -- cgit v1.3.1