I\'ve read a bunch of articles about the use of () => {} syntax, binding in the constructor, binding in the props etc.. but from what I understand, binding
() => {}
Does this work? (Using TypeScript)
; ; interface IOnPasswordInputChange { (value: string): void; } private onPasswordInputChange = (type: string): IOnPasswordInputChange => { return (value: string) => { this.setState({ [type]: value }); }; }