Skip to content

Instantly share code, notes, and snippets.

@lencioni
Last active August 29, 2016 18:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lencioni/e3f54db6284c2c26d6a1 to your computer and use it in GitHub Desktop.
Save lencioni/e3f54db6284c2c26d6a1 to your computer and use it in GitHub Desktop.
React.js createClass snippet
snippet cc "createClass" b
var ${1:`!p snip.rv = ''.join(x.title() for x in re.sub('\.js$', '', snip.basename or 'ModuleName').split('_'))`} = React.createClass({
/**
* @return {Object}
*/
render: function() {
return (
$0
);
}
});
module.exports = $1;
endsnippet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment