When creating a component in React, I often want it to be independent, able to maintain its own state. And at the same time, I’d like its parent to be notified when the component’s state changes, and I want to enable the parent to pass down new state at any time.
Full article