I am working on a React project where the user will be prompted a series of questions, the answers to which will be combined as an object to be saved.
The parent component contains several children.
for example--
<Route path="Parent" component={Parent}>
<Route path="Child1" component={Child1} />
<Route path="Child2" component={Child2} />
<Route path="Child3" component={Child3} />
<IndexRoute component={Child1} />
</Route>
The parent will have an initial state of empty values ex. (this.state={value1:"", value2:""})
How can I pass data from the child to the parent (and props from the parent to the children) when using {this.props.children}?