Parent Child Interactions in React - abukhalil-LTUC-ASAC/amman-401d4 GitHub Wiki
Propping things up.., and down.
Since all features in a website can be separated, what would the interaction would be? Through props! Parent values can be passed down through props, and children could send values back by defining a prop method in the parent and passing it. What about parent to child state access? The most obvious way is to pass a method, into the child that triggers another method to pass in the state value you'd want, and send it back into the original method in the parent.
Passing around states could get really complex, a nested parent children components would lead to overcomplicated state management, that is the reason redux is needed. If all children are on a single level, data could be passed from child to parent to child and so on, otherwise it gets really heavy on logic processing and readability.
What can be passed along in a prop variable?
Lots of stuff, ranging from methods, to objects to variables, and even non-existing children.
Props.children allows to append any arbitrary code into the components own structure, allowing for holes to be plugged in with any shape of code for the ultimate reusability.