//constructorthis.state = {value: this.props.data.sid}; handleChange(event) { this.setState({value: event.target.value}); }value的初始值和data.sid的值如何同步,sid發(fā)生改變后,vlaue并沒(méi)有變化//render<input value={this.state.value} onChange={this.handleChange}/>
react中的input值如何同步props
胡子哥哥
2019-03-13 18:14:03