The following code snippet is a simple React component that demonstrates the use of useState, a React hook for managing state in functional components:
Describe why you should use a react state goes beyond the scope of the book.
You can find more information on this topic directly in the React documentation on useState
Anyway, we will try to give you examples that are easy to understand and with some information about it