Skip to content

Instantly share code, notes, and snippets.

@donavon
Last active January 22, 2021 11:04
Show Gist options
  • Save donavon/623df2664be31e4b63aadacf9799b0fa to your computer and use it in GitHub Desktop.
Save donavon/623df2664be31e4b63aadacf9799b0fa to your computer and use it in GitHub Desktop.
A VSCode shortcut to create a new React Function Component
{
"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