我有一个这样的路线结构:
<Route path="/master" component={MasterPageLayout}>
<IndexRoute path="/master/products" component={ProductsPage}/>
<Route path="/master/customer/:id" component={CustomerDetailsPage}/>
<Route path="/master/product/:id" component={ProductDetailsPage}/>
<Route path="/master/price-table" component={PriceTablePage} />
</Route>
<Route path="/poc" component={DistribuitorPageLayout}>
<IndexRoute path="/poc/inventory" component={InventoryPage}/>
</Route>
在MasterPageLayout
我有我的标题和我的侧边props.children
菜单(他上面的所有嵌套路由通用),在这些菜单结构中呈现,但我的标题为每条路由都有一个特定的文本。我如何将文本(可能还有其他一些数据)从孩子传递给父亲?