What is state?
Now that we've got to this point, it's imperative for us moving forward to understand what state is and how it works inside a React component. Once we learn this, we'll be fully capable of using React to the best of our abilities. This unlocks the missing link we've had until now, more exactly, it will unlock the key to making our mobile apps more dynamic.
We learned about props in Chapter 3, The Correct Mindset. It's the technique we use to pass data from one component to another. Think of props as the first level of a component. We need to level up our component creation skills so the most logical step now before going into any practical challenges is to learn about state.
Traditionally, in order to be able to use state inside our components, we had to use class components. Later versions of React, we got introduced to being able to use state even in functional components with something called hooks. We'll discuss hooks more right...