Skip to content

Instantly share code, notes, and snippets.

@klzns
Last active November 17, 2021 15:53
Show Gist options
  • Save klzns/6a3edeed3ec81282e1daecba55c43372 to your computer and use it in GitHub Desktop.
Save klzns/6a3edeed3ec81282e1daecba55c43372 to your computer and use it in GitHub Desktop.
Snippet to create React components fast, just typing `reactFunc`
{
"React Function Component": {
"description": "Write basic React component",
"prefix": "reactFunc",
"body": [
"import React from 'react'",
"import 'twin.macro'",
"",
"type ${1:${TM_FILENAME_BASE}}Props = {",
" $2",
"}",
"",
"export function ${1:${TM_FILENAME_BASE}}({ $3 }: ${1:${TM_FILENAME_BASE}}Props) {",
" ",
" return (",
" $4",
" )",
"}",
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment