Getting to know more useState hooks:
Started by creating a simple form with a username and password. Creating an object using to keep track of variable and set value of valriables.
I have been designing this first time so I might going to have very simple form on click information/ show on click. here is full code
Handling forms is about how you handle the data when it changes value or gets submitted.
In HTML, form data is usually handled by the DOM.
In React, form data is usually handled by the components.
When the data is handled by the components, all the data is stored in the component state.
You can control changes by adding event handlers in the onChange
attribute.
We can use the useState
Hook to keep track of each inputs value and provide a "single source of truth" for the entire application.