I have a React app, where props from a parent component are passed to a child component and the props then set the state on the child.
After I send an updated value to t
It would also be good to check if you even need to update the state, since this will cause a re-render.
componentWillReceiveProps(newProps) { if (this.state.name !== newProps.name) { this.setState({name: newProps.name}); } }