Skip to content

Instantly share code, notes, and snippets.

@randylien
Last active November 18, 2015 23:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save randylien/dc87ac72267f97220346 to your computer and use it in GitHub Desktop.
Save randylien/dc87ac72267f97220346 to your computer and use it in GitHub Desktop.
React Life Cycle Template
'use strict';
var React = require('react');
var ReactComponentName = React.createClass({
getDefaultProps: function() {
return {
};
},
getInitialState: function() {
return {
};
},
componentWillMount: function() {
},
render: function() {
return (
<div />
);
},
componentDidMount: function() {
},
componentWillReceiveProps: function(nextProps) {
},
shouldComponentUpdate: function(nextProps, nextState) {
},
componentWillUpdate: function(nextProps, nextState) {
},
componentDidUpdate: function(prevProps, prevState) {
}
});
module.exports = ReactComponentName;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment