Next.js beginner 15 min

Forms

Learn about Forms in Next.js.

Forms

Forms in React use state to control input values. This is called controlled components. The value of the input is stored in state and updated on every change.

Example

<input value={name} onChange={e => setName(e.target.value)} />

Practice

Create a form with name and email fields. Show the values below the form as the user types.