Skip to content

Instantly share code, notes, and snippets.

@ChuckJHardy
Last active September 15, 2016 09:23
Show Gist options
  • Save ChuckJHardy/96a556e3e1e2d4d92701 to your computer and use it in GitHub Desktop.
Save ChuckJHardy/96a556e3e1e2d4d92701 to your computer and use it in GitHub Desktop.
ReactJS Example Structure
React.createClass({
displayName: 'Name',
propTypes: {},
mixins: [],
getInitialState: function() {
return {};
},
getDefaultProps: function() {
return {};
},
componentWillMount: function() {},
componentDiDMount: function() {},
componentWillReceiveProps: function() {},
shouldComponentUpdate: function() {},
componentWillUpdate: function() {},
componentDidUpdate: function() {},
componentWillUnmount: function() {},
// Public
parseData: function() {
this._parseData();
},
// Private
_parseData: function() {},
_onSelect: function() {},
render: function() {}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment