Skip to content

Instantly share code, notes, and snippets.

@simongong
Last active September 18, 2015 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simongong/fc5df9ae19e4308d2063 to your computer and use it in GitHub Desktop.
Save simongong/fc5df9ae19e4308d2063 to your computer and use it in GitHub Desktop.
sublime-snippet: React component snippet
<snippet>
<content><![CDATA[
import React from 'react';
let ${1:componentName} = React.createClass({
propTypes: {
},
getInitialState() {
return {};
},
componentWillMount() {
},
componentDidMount() {
},
componentWillUnmount() {
},
componentWillReceiveProps(nextProps) {
},
shouldComponentUpdate(nextProps, nextState) {
},
componentWillUpdate(nextProps, nextState) {
},
componentDidUpdate(prevProps, prevState) {
},
render() {
}
});
modular.exports = ${1:componentName};
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>React.create</tabTrigger>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment