A partial object update accidentally drops other fields.
const [form, setForm] = useState({ email: '', password: '' }); function onChangeEmail(value) { setForm({ email: value }); }
What is the bug in this code?