Other hooks and why they're relevant
The main problem with state is the fact that the only way we can use it is in a class
component. Class components are generally seen as a bit ugly and hard to learn for some beginners, so the React team tried creating something new that promised to solve the problems beginners and advanced users could have gotten into while using a class component with the traditional use of state. This is how hooks were born.
Hooks were introduced in React v16.8 and React Native v0.59. They basically let you use state and other React features without writing a class.
So, what exactly does that mean for us? Let's look at an example of how state is written with our new hooks feature:
Woah! So, what do we have here? Is this really the same state feature we've been using so far? Yes, it is. If you were to copy this code into a fresh new project, you'd see that once you...