Last active
January 22, 2021 11:04
-
-
Save donavon/623df2664be31e4b63aadacf9799b0fa to your computer and use it in GitHub Desktop.
A VSCode shortcut to create a new React Function Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tsx": { | |
"prefix": "tsx", | |
"description": "Create a TypeScript React Function Component", | |
"body": [ | |
"import React from 'react';", | |
"", | |
"type ${1:MyComponent}Props = {", | |
" children: React.ReactNode;", | |
"};", | |
"", | |
"export const $1 = ({ children }: $1Props) => {", | |
"", | |
" return (", | |
" $0", | |
" );", | |
"};" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment