According to the React tutorial at https://facebook.github.io/react/tutorial/tutorial.html:
When you want to aggregate data from multiple children or to have two child components communicate with each other, move the state upwards so that it lives in the parent component. The parent can then pass the state back down to the children via props, so that the child components are always in sync with each other and with the parent.
This seems to contradict good OOP practices where each object maintains it own state.
Consider a case where a Parent has two children, with a structure as follows
Now
Child1
just has theinput
component, andChild2
displays what was entered in the input sayIn this case if you keep the value of the input in Child1, you cannot access it from the Parent as state is local to a component and is a private property . So it makes sense to keep the property in parent and then pass it down to child as props so that both children can use it
A sample snippet