私はthis.props.childrenする小道具として渡したいいくつかの状態が生じていますルータ主成分ページ4React Router 4とスイッチを使ってthis.props.childrenに小道具を渡すには?
<MainComponent>
<ChildComponent></ChildComponent>
<ChildComponent></ChildComponent>
<ChildComponent></ChildComponent>
<MainComponent>
を反応させ使用して、スイッチで次のように入れ子に持っています。 メインコンポーネントのレンダリングメソッドでは、子コンポーネントにアクセスするために{this.props.children}を記述しました。今、あなたの状態が一日であると仮定し、ヘルプ
を使用して、あなたの状態を取得することができますChildComponentコンポーネントは、あなたの質問に対する答えはhttps://stackoverflow.com/questions/32370994/how-to-pass-props-to-this-propsです - 子供 –