Generally, it’s better if components don’t have state and only function based on the props they are passed. However, when state is required, React has an API for setting the initial state and updating the state. Ryan creates a summary/details component to explain how React manages state.
Get Unlimited Access Now