bertho-zero/react-redux-universal-hot-example

Devtools render bug

Closed this issue · 0 comments

This issue is similar to #484. DevTools module is also used in client.js to be rendered in DOM. Since it is using require instead of import we need to use <module>.default instead.

 if (__DEVTOOLS__ && !window.devToolsExtension) {
   const devToolsDest = document.createElement('div');
   window.document.body.insertBefore(devToolsDest, null);
-  const DevTools = require('./containers/DevTools/DevTools');
+  let DevTools = require('./containers/DevTools/DevTools');
+  DevTools = DevTools.__esModule ? DevTools.default : DevTools;
   ReactDOM.hydrate(
     <Provider store={store}>
       <DevTools />
     </Provider>,
     devToolsDest
   );
 }