Skip to content

Instantly share code, notes, and snippets.

@azaek
Created September 4, 2023 18:28
Show Gist options
  • Save azaek/1bcc6cc0ce282927758a7bfa860a92c9 to your computer and use it in GitHub Desktop.
Save azaek/1bcc6cc0ce282927758a7bfa860a92c9 to your computer and use it in GitHub Desktop.
VS Snippets
{
"Create a functional component tsx": {
"prefix": "fnc",
"body": [
"import { FC } from 'react';",
"",
"",
"interface ${1:${TM_FILENAME_BASE}}Props {",
"$2",
"}",
"",
"const ${1:${TM_FILENAME_BASE}}: FC<${1:${TM_FILENAME_BASE}}Props> = ({",
"\t$0",
"}) => {",
"\treturn (",
"\t\t<div>",
"\t\t\t",
"\t\t</div>",
"\t)",
"}",
"",
"export default ${1:${TM_FILENAME_BASE}};",
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment