Why Do State Management?
Learn about state management.
We'll cover the following...
What is a state?
Throughout the course, we’ve been using the useState hook. We know that in React Native, state is a piece of data that we need to track that indicates the condition of a particular component within the app. If we recall our real world example earlier in the course, we talked about how a light switch has two states—on and off.
In React Native, a piece of information can change as a result of changing the UI. For example, this piece of information could be whether the user is logged in or not or a list of the posts the current user has created.
What is state management?
Previously, we stored the state of each component in the component itself. This method works well ...
Ask