Skip to content

Instantly share code, notes, and snippets.

@samselikoff
Last active October 15, 2024 22:27
Show Gist options
  • 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