A template for neat & clean React components.
Type React.cc→
followed by a tab to generate this beauty:
React.createClass({
////////////////////
// PROPS & STATES //
////////////////////
propTypes : {
},
getDefaultProps() {
return {
}
},
getInitialState() {
return {
}
},
////////////////
// RENDERINGS //
////////////////
render() {
return (
<div>
</div>
)
},
/////////////////////
// LIFECYCLE HOOKS //
/////////////////////
////////////////////
// EVENT HANDLERS //
////////////////////
/////////////
// GETTERS //
/////////////
/////////////
// SETTERS //
/////////////
//////////////////////
// DOM MANIPULATORS //
//////////////////////
////////////////////
// HELPER METHODS //
////////////////////
})
- Open Package Control inside of Sublime Text using
shift + cmd + P
- Search for
Package Control: Add Repository
- Add the link to this repo: https://github.com/pumpupapp/react-component-snippet
- Install the snippet:
shift + cmd + P
To launch Package Control again. - Start typing:
Package Control: Install Package
- Search for
react-component-snippet
- Done! Test it out by typing
React.cc→