Reactjs which is the better way to use change handler
问题 So I know there are several ways to do this but I am wondering which is the better or more appropriate way to create a search bar component? Could you please explain why? I'm new to react and have seen tutorials and what not and everybody does there change handlers a little differently. state = { term: '', }; onChange = this.onChange.bind(this); onChange(e) { console.log(e.target.value); this.setState({ term: e.target.value }); }; <input value={this.state.term} onChange={this.onChange} /> I