Skip to content

Instantly share code, notes, and snippets.

@samselikoff
Last active July 31, 2023 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samselikoff/846f48370086fc502a66a7df7dd0a7cb to your computer and use it in GitHub Desktop.
Save samselikoff/846f48370086fc502a66a7df7dd0a7cb to your computer and use it in GitHub Desktop.
A VSCode snippet that lets you type `ush` to define some new React state.
{
"Use state": {
"scope": "javascriptreact,typescriptreact",
"prefix": "ush",
"body": [
"let [${1}, set${1/(.*)/${1:/capitalize}/}] = useState($2);",
],
"description": "useState()"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment