Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save davidlivingrooms/7b11e9b3ee99d45f5695 to your computer and use it in GitHub Desktop.
Save davidlivingrooms/7b11e9b3ee99d45f5695 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