3
我目前正在嘗試從v3遷移反應路由器到v4,但我無法完全理解新的概念,我的舊反應路由器v3代碼看起來像這樣,有人可以請看看並給我一些提示?遷移反應路由器v3到v4
謝謝!
<Router history={ browserHistory }>
<Route path="/" component={ App }>
<IndexRoute name="index" component={ Index } />
<Route name="documents" path="/documents" component={ Documents } onEnter={ authenticate } />
<Route name="newDocument" path="/documents/new" component={ NewDocument } onEnter={ authenticate } />
<Route name="editDocument" path="/documents/:_id/edit" component={ EditDocument } onEnter={ authenticate } />
<Route name="viewDocument" path="/documents/:_id" component={ ViewDocument } onEnter={ authenticate } />
<Route name="login" path="/login" component={ Login } />
<Route name="recover-password" path="/recover-password" component={ RecoverPassword } />
<Route name="reset-password" path="/reset-password/:token" component={ ResetPassword } />
<Route name="signup" path="/signup" component={ Signup } />
<Route path="*" component={ NotFound } />
</Route>
</Router>
謝謝!將嘗試它! PD:docs對我來說非常困難! jajaja – razor7
看看頂部的例子:) – lustoykov
考慮到你的答案,我能夠升級從流星廚師基地樣板https://github.com/mgscreativa/base看看進口/ ui/layouts/App.js – razor7