react-router-dom中route报错处理 Invalid prop 'component' supplied to 'Route': the prop is not a valid React component

component={UserManagement} 换成 render={(props) => <UserManagement {...props} />}

<Route path="/" render={(props)=><State {...props}/>}  exact
  // component={State}
>
</Route>

 

posted @ 2020-08-19 15:21  酸suan  阅读(1488)  评论(0编辑  收藏  举报