由于不清楚App组件的this.props.children属性就是子组件,所以在url设置路径访问时希望的组件一直不能显示。
由于不清楚App
this.props.children
参考:http://www.ruanyifeng.com/blog/2016/05/react_router.html
同时由于react-router组件版本升级(v4 -- react-router-dom),对于一些老的使用方法可能不再适用
https://stackoverflow.com/questions/43008036/the-prop-history-is-marked-as-required-in-router-but-its-value-is-undefine
React Router 使用教程
原文:http://www.cnblogs.com/heron-yu/p/7151830.html