Created
April 1, 2016 15:44
-
-
Save bingeboy/02dd246b94a25bcbb9924c42a689d5e3 to your computer and use it in GitHub Desktop.
react es5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var React = require('react'); | |
var Foo = React.createClass({ | |
/** | |
* PropTypes | |
*/ | |
propTypes: { | |
className: React.PropTypes.string, | |
}, | |
/** | |
* Get default props | |
* @returns {Object} props | |
*/ | |
getDefaultProps: function () { | |
return { | |
}; | |
}, | |
/** | |
* Get initial state | |
* @returns {Object} state | |
*/ | |
getInitialState: function () { | |
return { | |
}; | |
}, | |
/** | |
* Component did mount | |
* @returns {undefined} undefined | |
*/ | |
componentDidMount: function () { | |
}, | |
/** | |
* Component will mount | |
* @returns {undefined} undefined | |
*/ | |
componentWillMount: function () { | |
}, | |
/** | |
* Component will receive props | |
* @param {Object} nextProps - New props | |
* @returns {undefined} undefined | |
*/ | |
componentWillReceiveProps: function (nextProps) { | |
}, | |
/** | |
* Render component | |
* @returns {Object} React element | |
*/ | |
render: function () { | |
return ( | |
<div> | |
Foo | |
</div> | |
); | |
} | |
}); | |
module.exports = Foo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment