Skip to content

Instantly share code, notes, and snippets.

@yungsters
yungsters / gist:7791581
Last active December 30, 2015 06:49
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.