在 reactjs 中使用路由器时收到此警告。
警告:您正在为React.PropTypes
上的path
道具手动调用Route
验证功能。这已被弃用,在下一个主要版本的生产中无法使用。
ReactDOM.render(
<Router history={hashHistory}>
<Route path="/" component={Routing}></Route>
</Router>,
document.getElementById('layout')
);
答案 0 :(得分:1)
使用react-router
时,旧版React@^15.3.0
似乎存在问题。
解决此问题的唯一方法是更新react-router
或降级react
。
进一步阅读: