Skip to content

Instantly share code, notes, and snippets.

@metruzanca
Last active December 29, 2020 02:31
Show Gist options
  • Save metruzanca/f5d5040b2edafb8f065244fb69f24396 to your computer and use it in GitHub Desktop.
Save metruzanca/f5d5040b2edafb8f065244fb69f24396 to your computer and use it in GitHub Desktop.
VSCode Snippets I use
{
"Gatsby Function Component": {
"prefix": "gfc",
"body": [
"import React from \"react\"",
"import { useStaticQuery, graphql } from \"gatsby\"",
"",
"// import {} from './styles'",
"",
"interface Props {",
"",
"}",
"",
"const ${1:$TM_FILENAME_BASE}: React.FC<Props> = ({}) => {",
" // const data = useStaticQuery(graphql`",
" // query ${1:$TM_FILENAME_BASE}Query {",
"",
" // }",
" // `)",
"",
" return (",
" <div>{'$TM_FILENAME'}</div>",
" )",
"}",
"",
"export default ${1:$TM_FILENAME_BASE};"
],
"description": "Gatsby Function Component"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment