Skip to content

Instantly share code, notes, and snippets.

@subicura
Created January 6, 2020 11:20
Show Gist options
  • Save subicura/fbbb905f6e46b3c98b2e3d5027476be9 to your computer and use it in GitHub Desktop.
Save subicura/fbbb905f6e46b3c98b2e3d5027476be9 to your computer and use it in GitHub Desktop.
vscode snippet example
{
"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