Skip to content

Instantly share code, notes, and snippets.

@bherrero
Last active April 14, 2017 01:08
Show Gist options
  • Save bherrero/91df6a20316d3531559e4d3ea61f7b95 to your computer and use it in GitHub Desktop.
Save bherrero/91df6a20316d3531559e4d3ea61f7b95 to your computer and use it in GitHub Desktop.
React Class Snippet for writing components
<snippet>
<content><![CDATA[
import React from 'react';
class $1 extends React.Component {
render() {
return (
$2
);
}
}
$1.propTypes = {
// propName: React.PropTypes.(propType).(isRequired)
};
export default $1;
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>ReactClass</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment