I am studying a bit of Reactjs because I got excited with Next.js.
After reading the basic tutorial, I got a bit disappointed on how to manage forms: citing react doucmentation “form elements naturally keep some internal state”. So the tutorial seems to suggest an approach to keep in sync the form state with the react state object. This article cast some lights on the two ways to manage forms in reactjs: and explain the Controlled and Uncontrolled options you have.
The article is good because offer two “plain vanilla” example and give you some ideas on how different react libraries solves the problems.
Also, to fully understand the magic behind useState(), refer to this very good article.