I need to include a text input in a React component, with its initial value passed from the component's props:
<input value={this.props.value} type='text'/>
But the input is not editable, and React complains:
Warning: Failed form propType: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field.
So I add a onChange event handler:
<input value={this.props.value} type='text' onChange={this.valueChanged} />
What should I do in the valueChanged handler to update the input value? Do I have to use state?