How to handle state in React.
Osmel Mora
66213

Let’s say you’re writing a stateful, reusable, react component named Foo. It has complex state and logic, much of which shouldn’t be exposed to a user.

How should you handle the case where Foo’s parent needs to set that state (for example, reset Foo back to default when a user clicks a button)?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.