Please enable JavaScript.
Coggle requires JavaScript to display documents.
React LifeCycle (Mounting Cycle (getInitialState() :star:, Parent: …
React LifeCycle
Mounting Cycle
getInitialState() :star:
Parent
: componentWillMount()
Child:
componentWillMount()
render() :recycle:
Child
: componentDidMount()
constructor()
Parent
: componentDIdMount()
Updating Cycle
Scenario A: Updating State - state updated and passed as props from Parent to child component
Parent
: componentWillUpdate(nextState)
Child
: componentWillReceiveProps(nextProps)
Parent
: shouldComponentUpdate(nextState)
Child
: shouldComponentUpdate(nextProps)
Child
: componentWIllUpdate(nextProps)
render() :recycle:
Child
: componentDIdUpdate(nextProps)
Parent
: componentDIdUpdate(nextState)
Scenario B: unmounting child component
Parent
: componentWillUpdate()
Child
: componentWillUnmount() :red_cross:
Parent
: shouldComponentUpdate()
render() :recycle:
Parent
: setState()
Parent
: componentDidUpdate()