Skip to content

Instantly share code, notes, and snippets.

@subeeshb
Last active May 1, 2021 04:15
Show Gist options
  • Save subeeshb/1d2c81b372464823f907b08e494121f3 to your computer and use it in GitHub Desktop.
Save subeeshb/1d2c81b372464823f907b08e494121f3 to your computer and use it in GitHub Desktop.
Functional component snippet for TS
"component": {
"prefix": "component",
"body": [
"import * as React from 'react';",
"",
"type Props = {};",
"",
"function ${TM_FILENAME_BASE}(props: Props): JSX.Element {",
" return (",
" <div>$0</div>",
" );",
"}",
"",
"export default ${TM_FILENAME_BASE};"
],
"description": "Create a new functional React component with typescript."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment