react-hot-loader

React.createElement: type is invalid — expected a string

倾然丶 夕夏残阳落幕 提交于 2019-11-27 01:26:21
问题 Trying to get react-router (v4.0.0) and react-hot-loader (3.0.0-beta.6) to play nicely, but getitng the following error in the browser console: Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. index.js: import React from 'react'; import ReactDom from 'react-dom'; import routes from './routes.js'; require(