-
-
Save ysyun/25bea7002d2a4908664e0a4bbbaffb58 to your computer and use it in GitHub Desktop.
Cheatsheet for React lifecycle and update cycle methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lifecycle: | Update: | |
Mounting and Unmounting | New Props or State | |
--------------------------------+----------------------------------- | |
| | |
getDefaultProps() | componentWillReceiveProps()* | |
| | |
getInitialState() | shouldComponentUpdate() | |
| | |
componentWillMount() | componentWillUpdate() | |
| | |
render() | render() | |
| | |
----------------------- DOM Mutations Complete ---------------------- | |
| | |
componentDidMount() | componentDidUpdate() | |
| | |
--------------------------------| | |
| | |
componentWillUnmount() | | |
| | |
--------------------------------+------------------------------------ | |
*Called only with new props |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment