Lifting State Up
If two components need to share the same state, move it to their closest common ancestor and pass it down via props.
React JS 0 to Hero: The Complete Guide
If two components need to share the same state, move it to their closest common ancestor and pass it down via props.