Last active
November 10, 2020 05:14
-
-
Save frencojobs/c5bcbb26f19736bc9b2164eecddd3ad2 to your computer and use it in GitHub Desktop.
My vscode snippets.
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
{ | |
"react functional component": { | |
"prefix": "rfc", | |
"body": [ | |
"export const ${TM_FILENAME_BASE/(\\w)/${1:/upcase}/}: React.FC = () => {", | |
" return <>$0</>", | |
"}" | |
], | |
"description": "react functional component" | |
}, | |
"react functional component with props": { | |
"prefix": "rfcp", | |
"body": [ | |
"type Props = {}", | |
"", | |
"export const ${TM_FILENAME_BASE/(\\w)/${1:/upcase}/}: React.FC<Props> = () => {", | |
" return <>$0</>", | |
"}" | |
], | |
"description": "react functional component with props" | |
}, | |
"next page component": { | |
"prefix": "npc", | |
"body": [ | |
"import { NextPage } from 'next'", | |
"", | |
"const ${TM_FILENAME_BASE/(\\w)/${1:/upcase}/}Page: NextPage = () => {", | |
" return <>$0</>", | |
"}", | |
"", | |
"export default ${TM_FILENAME_BASE/(\\w)/${1:/upcase}/}Page" | |
], | |
"description": "next page component" | |
}, | |
"next page component with props": { | |
"prefix": "npcp", | |
"body": [ | |
"import { NextPage } from 'next'", | |
"", | |
"type Props = {}", | |
"", | |
"const ${TM_FILENAME_BASE/(\\w)/${1:/upcase}/}Page: NextPage<Props> = () => {", | |
" return <>$0</>", | |
"}", | |
"", | |
"export default ${TM_FILENAME_BASE/(\\w)/${1:/upcase}/}Page" | |
], | |
"description": "next page component with props" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment