Skip to content

Commit 4fde124

Browse files
authored
feat(react-ts): add type to functional component
* feat(react-ts): add type to functional component * feat(react-ts): added component name to props interface in functional component
1 parent a143d51 commit 4fde124

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vscode/snippets/react-typescript.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"body": [
2525
"import React from \"react\";",
2626
"",
27-
"interface Props {}",
27+
"interface I${1:${TM_FILENAME_BASE}}Props {}",
2828
"",
29-
"function ${1:${TM_FILENAME_BASE}}({}: Props) {",
29+
"function ${1:${TM_FILENAME_BASE}}({}: I${1:${TM_FILENAME_BASE}}Props): JSX.Element {",
3030
" return <div></div>;",
3131
"}",
3232
"",

0 commit comments

Comments
 (0)