Skip to content

Instantly share code, notes, and snippets.

Created May 5, 2015 18:38
  • Star 10 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Cheatsheet for React lifecycle and update cycle methods
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
Copy link

nevinm commented Sep 25, 2016

Could you also add where the DOM mutations are best to be done. Also where the state shouldn't be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment