have to differentiate between updates triggered by the parent (changing props) and internally triggered updates (changing state)
here we'll be focusing on triggered by parent
process:
componentWillReceiveProps(nextProps) | DO: sync state to props | DON'T: cause side-effects
shouldComponentUpdate(nextProps, nextState) | may cancel the updating process! | DO: decide whether to continue with the update or not | DON'T: cause side effects
(if allowed to update) componentWillUpdate(nextProps, nextState) | DO: sync state to props | DON'T: cause side effects
render() | prepare and structure your JSX code
(if allowed to update) React will then update all child component props, may trigger update for child components
(if allowed to update) componentDidUpdate() | DO: cause side effects | DON'T: update state (triggers re-render)