This is where you have multiple nested form object.

The value of textarea here is update to form.

Object Example:

const [form, setForm] = useState(
{
mathType: {
        value: 'The textarea content default value'
     },
 });

 

The setForm updates form.mathType.value on Change

<textarea
onChange={(e) => setForm(
{...form, ['mathType']: {
  ...form['mathType'],
value: e.target.value
       }
})}
></textarea>