FrontendMasters / react-enlightenment

A thoughtful and complete introduction to React.
https://www.reactenlightenment.com
429 stars 79 forks source link

Fixing the updating phase in the react component lifecycle #38

Closed glrodasz closed 7 years ago

glrodasz commented 7 years ago

There is an issue on section 6.7 where the update lifecycle is wrong, it says:

Updating Phase follows this order:
componentWillReceiveProps()
shouldComponentUpdate()
render()
Children Life cycle methods
componentWillUpdate()

But it should be:

Updating Phase follows this order:
componentWillReceiveProps()
shouldComponentUpdate()
componentWillUpdate()
render()
Children Life cycle methods
componentDidUpdate()
codylindley commented 7 years ago

Thanks.