Skip to content

Commit f297ce7

Browse files
committed
Add react cln prefix
1 parent 2ff1c7d commit f297ce7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

snippets/javascript/react.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
"body": "import { Component, PropTypes } from 'react'\n\nclass ${TM_FILENAME_BASE} extends Component {\n\tconstructor(props) {\n\t\tsuper(props)\n\n\t}\n\n\tcomponentWillMount () {\n\n\t}\n\n\tcomponentDidMount () {\n\n\t}\n\n\tcomponentWillReceiveProps (nextProps) {\n\n\t}\n\n\tshouldComponentUpdate (nextProps, nextState) {\n\n\t}\n\n\tcomponentWillUpdate (nextProps, nextState) {\n\n\t}\n\n\tcomponentDidUpdate (prevProps, prevState) {\n\n\t}\n\n\tcomponentWillUnmount () {\n\n\t}\n\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\n\t\t\t</div>\n\t\t)\n\t}\n}\n\n${1}.propTypes = {\n\n}\n\nexport default ${1}",
3232
"description": "Creates a React component class with PropTypes and all lifecycle methods"
3333
},
34+
"reactJSXClassName": {
35+
"prefix": "cla",
36+
"body": "className=\"${1:classes}\"$0",
37+
"description": "JSX className attribute for React components"
38+
},
3439
"reactFunctionComponent": {
3540
"prefix": "rfc",
3641
"body": "\nconst ${TM_FILENAME_BASE} = () => {\n\treturn (\n\t\t<div>\n\t\t\t$0\n\t\t</div>\n\t)\n}\n\nexport default ${TM_FILENAME_BASE}",

0 commit comments

Comments
 (0)