import {Router,Link,Route,hashHistory} from 'react-router'console.log(hashHistory) => undefined ??console.log(Route) ?=> 輸出正確dependencies 中已安裝?"react-router": "^4.1.2", ?頁面運(yùn)行正常,就是引入react-router 會(huì)異常這是為何?defined21:09:52.562 main.js:826 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. Check the render method of `Root`.21:09:52.566 main.js:826 Warning: Failed prop type: The prop `history` is marked as required in `Router`, but its value is `undefined`.ght TypeError: Cannot read property 'location' of undefined
react-router 引入hashHistory 為何為undefined
chenzhizhuo
2017-09-03 21:16:13