React Lifecycle

Nikhil John

Flow 1: Mounting

constructor()
static getDerivedStateFromProps()
render()
componentDidMount()
componentWillMount()

Flow 2: Updating

(prop change)

static getDerivedStateFromProps()
shouldComponentUpdate()
render()
getSnapshotBeforeUpdate()
componentDidUpdate()
componentWillUpdate()
componentWillReceiveProps()

Flow 2: Unmounting

componentDidUnmount()

React Best Practices

Questions?

React Lifecycle

By Nikhil John

React Lifecycle

  • 618