As described in documentation You need to use controlled input. To make an input – controlled you need to specify two props on it
onChange– function that would set componentstateto an inputvalueevery time input is changedvalue– input value from the componentstate(this.state.valuein example)
Example:
getInitialState: function() {
return {value: 'Hello!'};
},
handleChange: function(event) {
this.setState({value: event.target.value});
},
render: function() {
return (
<input
type="text"
value={this.state.value}
onChange={this.handleChange}
/>
);
}
More specifically about textarea – here