Skip to content

Instantly share code, notes, and snippets.

@yungsters
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" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>js</string>
<string>htc</string>
<string>jsx</string>
</array>