Skip to content

Instantly share code, notes, and snippets.

@yungsters
Last active December 30, 2015 06:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yungsters/7791581 to your computer and use it in GitHub Desktop.
Save yungsters/7791581 to your computer and use it in GitHub Desktop.
React Component Lifecycle Parallels
==== MOUNT ==== ==== UPDATE ==== ==== NOTE ====
getInitialState componentWillReceiveProps Used to update state in response to prop changes.
shouldComponentUpdate If false, discards state changes from `componentWillReceiveProps`.
componentWillMount componentWillUpdate All state and props are set to what they will be in `render`.
< render > < render >
componentDidMount componentDidUpdate All DOM mutations have occurred.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment