默認顯示users/one,要如何進行設置?
react-router4.0二級默認路由如何設置
DIEA
2019-03-07 14:14:55
TA貢獻1872條經驗 獲得超4個贊
可以用重定向
<BrowserRouter
forceRefresh={!('pushState' in history)}
keyLength={12}
<Switch>
< Route exact path="/" render={() => <Redirect to="/users/one"}/>
</Switch>
</BrowserRouter>
舉報