【发布时间】:2016-02-17 14:05:42
【问题描述】:
我正在使用 react-redux-router。 我有以下代码:
<Router history={hashHistory}>
<Route path="/" component={App}>
<IndexRoute component={Home} />
<Route path="/product/:id" component={Product} />
</Route>
</Router>
当我的路线是“/”和我的路线是“/product/:id”时,我想在 App 组件中显示不同的数据。如何在组件 App 中跟踪路由的变化。
【问题讨论】:
标签: reactjs react-router redux