1
爲什麼此路由器配置無法導航到'/ 1/abc/home/inbox'? 控制檯中沒有錯誤/警告。路由器配置不會切換頁面
在路由器文檔中沒有找到答案。
<Router history={browserHistory}>
<Route path="/:id/:name/home" component={Home}>
<Route path="inbox" component={Inbox}/>
</Route>
</Router>
此代碼導航到由鏈接是否正確收件箱上方:
<Router history={browserHistory}>
<Route path="/:id/:name/home" component={Home}/>
<Route path="/:id/:name/home/inbox" component={Inbox}/>
</Router>
謝謝!
你的路線似乎沒問題。我有一個完全像這樣的本地測試設置,它可以工作。您的家庭組件是否正確顯示props.children? – 0xRm
我也可以按預期確認這項工作。你能爲我們定義'不會導航到'嗎? –
答案在下面。謝謝! – Drew