Error message
TypeScript error in FormSignUp.tsx(43,19):
Argument of type '{ [x: string]: string; }' is not assignable to parameter of type 'MyState | ((prevState: Readonly<MyState>, props: Readonly<{}>) => MyState | Pick<MyState, keyof MyState> | null) | Pick<...> | null'.
Type '{ [x: string]: string; }' is missing the following properties from type 'Pick<MyState, keyof MyState>': name, email, confirm_email TS2345
41 |
42 | onChange(e: ChangeEvent<HTMLInputElement>): void {
> 43 | this.setState({ [e.target.name]: e.target.value });
| ^
44 | }
45 |
Encontrei a solução