What is the correct type for React events. Initially I just used any for the sake of simplicity. Now, I am trying to clean things up and avoid use of any<
any
any<
I think the simplest way is that:
type InputEvent = React.ChangeEvent; type ButtonEvent = React.MouseEvent; update = (e: InputEvent): void => this.props.login[e.target.name] = e.target.value; submit = (e: ButtonEvent): void => { this.props.login.logIn(); e.preventDefault(); }