一、自顶向下匹配的路由算法
<Route path="/currentJourney" component={CurrentJourney} exact={true} />
<Redirect from="/historyJourney" to='/currentJourney' />
<Route path="/historyJourney" component={HistoryJourney} exact={true} />
这样写在跳转 /historyJourney 的时候,会立马在跳转到 /currentJourney 去。
<Route path="/currentJourney" component={CurrentJourney} exact={true} />
<Route path="/historyJourney" component={HistoryJourney} exact={true} />
<Redirect from="/historyJourney" to='/currentJourney' />
跳转 /historyJourney 的时候,不会跳转到 /currentJourney去。