We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4993740 commit b5a0f35Copy full SHA for b5a0f35
packages/vscode/snippets/react-typescript.json
@@ -22,15 +22,13 @@
22
"rfct": {
23
"prefix": "rfct",
24
"body": [
25
- "import React from \"react\";",
+ "import type { FC } from 'react'",
26
"",
27
- "interface I${1:${TM_FILENAME_BASE}}Props {}",
+ "interface ${TM_FILENAME_BASE}Props {}",
28
29
- "function ${1:${TM_FILENAME_BASE}}({}: I${1:${TM_FILENAME_BASE}}Props): JSX.Element {",
30
- " return <div></div>;",
31
- "}",
32
- "",
33
- "export default ${1:${TM_FILENAME_BASE}};"
+ "export const $TM_FILENAME_BASE: FC<${TM_FILENAME_BASE}Props> = ({$2}) => {",
+ "\t\treturn ($3);",
+ "}"
34
],
35
"description": "Typescript: React functional component"
36
},
0 commit comments