Skip to content

Instantly share code, notes, and snippets.

@kvnxiao
Created August 7, 2021 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kvnxiao/df91b7584fed3b2fbeb1b76a358c3fd2 to your computer and use it in GitHub Desktop.
Save kvnxiao/df91b7584fed3b2fbeb1b76a358c3fd2 to your computer and use it in GitHub Desktop.
typescript-react-component.code-snippets
{
"TypeScript React Component": {
"scope": "typescriptreact",
"prefix": "tsc",
"body": [
"interface ${TM_FILENAME_BASE}Props {",
" $1",
"}",
"",
"export const ${TM_FILENAME_BASE}: React.FC<${TM_FILENAME_BASE}Props> = ({}: ${TM_FILENAME_BASE}Props) => {",
" return <div></div>",
"}",
""
],
"description": "Creates a TypeScript compatible React Component with props declaration"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment