Global State
We'll cover the following...
React state
In the React state
, all of the state
was held and modified within the same React component, which also happened to be the top-level application component. In most applications, the state
will need to be accessed from multiple components, and those components may need to modify the state. How should this state
be organized and managed?
As a programming principle, it’s important to avoid having multiple, mutable copies of the same state
, because the challenges of keeping them synchronized outweigh any possible advantages. It would be best ...