Skip to content

Commit e650077

Browse files
committed
adds ifr react snippet
1 parent ebd6c21 commit e650077

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

snippets/react.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
"prefix": "ds",
88
"body": ["const { ${1:name} } = this.state"]
99
},
10+
"if falsy return null": {
11+
"prefix": "ifr",
12+
"body": "if (!${1:condition}) {\n\treturn null\n}"
13+
},
1014
"reactClassCompoment": {
1115
"prefix": "rcc",
1216
"body": "import React, { Component } from 'react'\n\nclass ${1:componentName} extends Component {\n\trender () {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t$0\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nexport default ${1}",

0 commit comments

Comments
 (0)