diff --git a/app/containers/Root.js b/app/containers/Root.js
index edc6eaf1..c03fd1c4 100644
--- a/app/containers/Root.js
+++ b/app/containers/Root.js
@@ -3,6 +3,7 @@ import React from 'react'
import { Provider, connect } from 'react-redux'
import { ConnectedRouter } from 'react-router-redux'
import PropTypes from 'prop-types'
+import { hot } from 'react-hot-loader'
import {
setConnectionType,
@@ -243,8 +244,10 @@ Root.propTypes = {
syncingProps: PropTypes.object.isRequired
}
-export default connect(
- mapStateToProps,
- mapDispatchToProps,
- mergeProps
-)(Root)
+export default hot(module)(
+ connect(
+ mapStateToProps,
+ mapDispatchToProps,
+ mergeProps
+ )(Root)
+)
diff --git a/app/index.js b/app/index.js
index b292d8b0..ca5cf49c 100644
--- a/app/index.js
+++ b/app/index.js
@@ -16,12 +16,6 @@ render(
if (module.hot) {
module.hot.accept('./containers/Root', () => {
- const NextRoot = require('./containers/Root') // eslint-disable-line global-require
- render(
-
-
- ,
- document.getElementById('root')
- )
+ render(, document.getElementById('root'))
})
}
diff --git a/webpack.config.renderer.dev.js b/webpack.config.renderer.dev.js
index 438846ce..67303d1a 100644
--- a/webpack.config.renderer.dev.js
+++ b/webpack.config.renderer.dev.js
@@ -44,11 +44,7 @@ export default merge.smart(baseConfig, {
mode: 'development',
- entry: [
- 'react-hot-loader/patch',
- 'webpack/hot/only-dev-server',
- path.join(__dirname, 'app/index.js')
- ],
+ entry: ['webpack/hot/only-dev-server', path.join(__dirname, 'app/index.js')],
output: {
publicPath: `http://localhost:${port}/dist/`
@@ -296,14 +292,7 @@ export default merge.smart(baseConfig, {
})
)
)
- app.use(
- convert(
- history({
- verbose: true,
- disableDotRule: false
- })
- )
- )
+ app.use(convert(history()))
},
// Start the main process as soon as the server is listening.
on: {