UNPKG

403 BJavaScriptView Raw
1import React from 'react';
2import { hot } from 'react-hot-loader';
3import clientHandler from './app';
4
5const App = props => props.children;
6const HotApp = hot(module)(App);
7
8clientHandler.hooks.beforeRender.tap('AddHotModuleLoader', (app) => {
9 // eslint-disable-next-line
10 app.children = <HotApp>{app.children}</HotApp>;
11});
12
13if (module && module.hot && module.hot.accept) {
14 module.hot.accept();
15}