Last active
December 29, 2020 02:31
-
-
Save metruzanca/f5d5040b2edafb8f065244fb69f24396 to your computer and use it in GitHub Desktop.
VSCode Snippets I use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"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