通过导航后,this.props.history.push
我没有route params
进入component
.
我有component
在两条路线上呈现的单曲。
因此,从一条路线到另一条路线的结果是component update
,我没有route params
参与其中。
如果刷新页面我得到route params
this.props.history.push(`/pois/select/${lastAction.payload.poiID}`)
我的路由组件。
class Routes extends React.Component {
render() {
return <div>
<Switch >
<Route exact path="/pois/" component={ POIS } mode='view' />
<Route exact path="/pois/select/:poiID" component={ POIS } mode='select' />
<Route exact path="/pois/create" component={ POIS } mode='create'/>
<Route exact path="/pois/update/:poiID" component={ POIS } mode='update'/>
</Switch>
</div>;
}