Say I have a function:
handleChange = (e) => {
this.setState({ [e.target.id]: e.target.value });
}
What is the difference between the following:
1.
<FormControl value={this.state.password} onChange={this.handleChange} />
<FormControl value={this.state.password} onChange={(e) => this.handleChange(e)} />
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…