Controlled vs Uncontrolled Playground

Rara writes tonight’s puppet on the name board on the neighbourhood head’s screen: a controlled input, an uncontrolled one with a ref, or value with no…

Why it matters

Every React form uses one of them. Misreading it breeds the classic bugs: a "frozen" input (value with no onChange), the controlled/uncontrolled warning, a form reset that clears nothing, or a Save that prints an empty text.

The key idea

Controlled: React holds the text. Uncontrolled: the DOM does

Common mistakes

Try it in this playground