Created
January 6, 2020 11:20
-
-
Save subicura/fbbb905f6e46b3c98b2e3d5027476be9 to your computer and use it in GitHub Desktop.
vscode snippet example
This file contains 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
{ | |
"Default React Function Component": { | |
"prefix": "function-component", | |
"body": [ | |
"import React from 'react';", | |
"", | |
"interface I${TM_FILENAME_BASE/(^[a-z])|\\-([0-9a-z])/${1:/capitalize}${2:/capitalize}/g}Props {}", | |
"", | |
"const ${TM_FILENAME_BASE/(^[a-z])|\\-([0-9a-z])/${1:/capitalize}${2:/capitalize}/g}: React.FunctionComponent<I${TM_FILENAME_BASE/(^[a-z])|\\-([0-9a-z])/${1:/capitalize}${2:/capitalize}/g}Props> = () => {", | |
" return <></>;", | |
"};", | |
"", | |
"export default ${TM_FILENAME_BASE/(^[a-z])|\\-([0-9a-z])/${1:/capitalize}${2:/capitalize}/g};", | |
"" | |
], | |
"description": "Default React Function Component" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment