【发布时间】:2017-11-22 19:38:40
【问题描述】:
我使用 react router 4 进行如下嵌套
<MainComponent>
<ChildComponent></ChildComponent>
<ChildComponent></ChildComponent>
<ChildComponent></ChildComponent>
<MainComponent>
在主要组件页面上,我有一些状态,我想将其作为道具传递给 this.props.children。 在主组件渲染方法中,我编写了 {this.props.children} 来访问子组件。现在如何将我的 CustomProps 传递给 this.props.children
提前感谢您的帮助
【问题讨论】:
标签: reactjs react-router