react lifecycle methods understanding
1) componentWillReceiveProps is called before componentWillUpdate in React’s update lifecycle. You are right that componentWillReceiveProps allows you to call setState. On the other hand componentWillUpdate is a callback to use when you need to respond to a state change. The fundamental difference between props and state is that state is private to the component. That’s … Read more