Skip to content

Instantly share code, notes, and snippets.

@jaySmilet
Created October 10, 2025 02:40
Show Gist options
  • Select an option

  • Save jaySmilet/800502148b1d8f638365f0c0c34c0f04 to your computer and use it in GitHub Desktop.

Select an option

Save jaySmilet/800502148b1d8f638365f0c0c34c0f04 to your computer and use it in GitHub Desktop.
Migration uncontrolled components to controlled components
const [val, setVal] = useState("");
return (
<input value={val} onChange={e => setVal(e.target.value)} />
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment