Skip to content

Instantly share code, notes, and snippets.

@samselikoff
Last active July 30, 2024 01:37
Show Gist options
  • Save samselikoff/7fa99992dbc5df5ecfd1ec721e64b86d to your computer and use it in GitHub Desktop.
Save samselikoff/7fa99992dbc5df5ecfd1ec721e64b86d to your computer and use it in GitHub Desktop.
VSCode snippet for creating a loop of n numbers in JSX! https://twitter.com/samselikoff/status/1611406980639244301
{
"Range of numbers": {
"scope": "javascriptreact,typescriptreact",
"prefix": "range",
"body": [
"{[...Array($1).keys()].map((i) => (",
" <$2 key={i}>",
" $3",
" </$2>",
"))}",
],
"description": "Create a loop of n numbers"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment