Skip to content

Instantly share code, notes, and snippets.

@nbar1
Last active June 6, 2021 08:20
Show Gist options
  • Save nbar1/adac0139592d62de73e63f0007e3ec47 to your computer and use it in GitHub Desktop.
Save nbar1/adac0139592d62de73e63f0007e3ec47 to your computer and use it in GitHub Desktop.
{
"React Hook: Use State": {
"prefix": "us",
"body": [
"const [${1:Value}, set${1/(.*)/${1:/capitalize}/}] = useState($2);",
],
"description": "useState"
},
"React Hook: Use Effect": {
"prefix": "ue",
"body": [
"useEffect(() => {",
"\t$0",
"});",
],
"description": "useEffect"
},
"React Hook: Use Effect w/ Dep": {
"prefix": "ued",
"body": [
"useEffect(() => {",
"\t$0",
"}, [$1]);",
],
"description": "useEffect"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment