Skip to content

Instantly share code, notes, and snippets.

@bliaxiong
Last active August 29, 2015 14:22
Show Gist options
  • Save bliaxiong/a377d1d8887eab97405d to your computer and use it in GitHub Desktop.
Save bliaxiong/a377d1d8887eab97405d to your computer and use it in GitHub Desktop.
var React = require('react');
var Example = React.createClass({
//
propTypes: function() {
},
displayName: function() {
},
getInitialState: function() {
},
getDefaultProps: function() {
},
render: function() {
return (
<div />
);
}
// Lifecycle Methods - Mounting
componentDidMount: function() {
// Do AJAX here for data
},
componentWillUnmount: function() {
},
// Lifecycle Methods - Updating
componentWillReceiveProps: function() {
},
shouldComponentUpdate: function() {
},
componentWillUpdate: function() {
},
componentDidUpdate: function() {
},
componentWillUnmount: function() {
}
});
module.exports = Example;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment