There is a parent component
<TagsSelect name="Tags" value={this.state.tags} onChange={this.onFormChange} /> Inside it is another component
class TagsSelect extends React.Component { render() { const colors = ['orange', 'red', 'blue', 'purple']; return ( <Multiselect value={this.props.value} data={colors} onChange={value => this.props.value = value} /> ); } } An error occurs
Uncaught TypeError: Cannot assign property to read only property 'value' of object '#'
on the line this.props.value = value;
The question is how to return to the value of the parent element what is returned in value in onChange
state, and not in theprops. Either save to some storage external to the component and lower it to the component viaprops. - Nofate ♦