Skip to content

Instantly share code, notes, and snippets.

@jmaicaaan
Last active November 28, 2020 15:10
Show Gist options
  • Save jmaicaaan/37742406c0b739aa6cf3827632f7ae25 to your computer and use it in GitHub Desktop.
Save jmaicaaan/37742406c0b739aa6cf3827632f7ae25 to your computer and use it in GitHub Desktop.
"React Component using filename": {
"prefix": "react#component-using-filename",
"body": [
"export type ${TM_FILENAME_BASE/(.*)/${1:/capitalize}Props/} = {};",
"export const ${TM_FILENAME_BASE/(.*)/${1:/capitalize}/} = (props: ${TM_FILENAME_BASE/(.*)/${1:/capitalize}Props/}) => {",
" return (",
" $2",
" );",
"};"
],
"description": "Create a functional React component for TypeScript based on filename"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment