Skip to content

Instantly share code, notes, and snippets.

yungsters / gist:7791581
Last active Dec 30, 2015
React Component Lifecycle Parallels
View gist:7791581
==== 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.
View JavaScript (JSX).tmLanguage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">