score:2

Accepted answer

Fluent UI onChange function expects two parameters: event and value(optional)

(event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string) => void

https://developer.microsoft.com/en-us/fluentui#/controls/web/textfield#implementation

You may change your handleInputChange function like this:

  const handleInputChange = (
    event: { target: HTMLInputElement },
    newValue:String
  ):void => {
    const { name } = event.target;
    setUser({ ...user, [name]: newValue });
  };

You can check this working fiddle from here


Related Query

More Query from same tag