-
-
Save ysyun/5619e054b03e4411566a911192ec1a45 to your computer and use it in GitHub Desktop.
Cheatsheet for React lifecycle and update cycle methods
This file contains hidden or 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