Problem description:
In the process of learning react, the child component receives props of the parent component. At this time, I want to set the value passed by the parent component to the state of the child component.
After this error occurs, you can achieve this by putting setstate into componentWillReceiveProps hook
componentWillReceiveProps () {
console.log ('Component received new parameters') this.setState
({
value: this.props.value * 7
})
}