- App configuration in the root component
- Can call setState - but calling setState on a non-rendered component doesn't make sense
- Ajax calls
- setState can be called here
- Perhaps the Ajax call initiated by the parent's componentDidMount got resolved and a stream of new properties arrived at the component
- Here we have access to component nextProps and currentProps
- Do auxiliary stuff from the new property
- setState can be called here
- get access to next prop and next state
- compare it with current prop and state to return boolean
- do not call setState here
- Not used that much
- No access to next props
- Use componentWillReceiveProps
- Updating the DOM in response to prop and state changes
- setState can be called
- final cleanup
- setState can't be called