xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

React LifeCycle Methods & re-learning 2019

React LifeCycle Methods & re-learning 2019

v16.9.0

https://reactjs.org/docs/react-component.html#the-component-lifecycle

  1. static getDerivedStateFromProps()

https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops

  1. getSnapshotBeforeUpdate()

https://reactjs.org/docs/react-component.html#getsnapshotbeforeupdate

UNSAFE_componentWillUpdate()

UNSAFE_componentWillReceiveProps()

UNSAFE_componentWillMount()


react-lifecycle-methods-diagram

http://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/

v16.4+

v16.3


https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#migrating-from-legacy-lifecycles

https://egghead.io/lessons/react-refactor-componentwillreceiveprops-to-getderivedstatefromprops-in-react-16-3


posted @ 2019-09-24 10:09  xgqfrms  阅读(192)  评论(3编辑  收藏  举报