路由是這樣的<Router history={hashHistory}> <Route path="/" component={App}>
<IndexRoute component={AppIndex} />
</Route></Router>App代碼是這樣的然后AppIndex是這樣的這樣子運行之后,控制臺的輸出為頁面中AppIndex顯示的是NULL,除非點擊AppIndex的路由導致AppIndex的render才會正確顯示id屬性。到底這個App和AppIndex應該怎么樣通信?或者如何在App重新渲染的時候自動重新渲染AppIndex哪怕路由沒有改變?
ReactRouter的組件通信問題?
拉風的咖菲貓
2018-09-06 09:09:16