← React Intermediate Questions - Set 4 Q38

What are controlled and uncontrolled forms in React?

React Intermediate Questions - Set 4

Example

<input value={v} onChange={e => setV(e.target.value)} />   // controlled
<form onSubmit={e => console.log(new FormData(e.target))}>  // uncontrolled
  <input name="email" />
</form>

What to notice

← Back to the question list