react-enlightenment
react-enlightenment copied to clipboard
componentWillUpdate() comes before render()
6.7 says
Updating Phase follows this order:
componentWillReceiveProps()
shouldComponentUpdate()
render()
Children Life cycle methods
componentWillUpdate()
but the docs say "Invoked immediately before rendering when new props or state are being received. This method is not called for the initial render."
Yeah, there is a bug there. The correct order is:
componentWillReceiveProps()
shouldComponentUpdate()
componentWillUpdate()
render()
Children Life cycle methods
componentDidUpdate()
I have the fix in this PR: https://github.com/FrontendMasters/react-enlightenment/pull/38