Skip to content

Instantly share code, notes, and snippets.

@fhugoduarte
Last active September 26, 2020 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fhugoduarte/9a48011ac0afa6e7ca0510d14fc65fa3 to your computer and use it in GitHub Desktop.
Save fhugoduarte/9a48011ac0afa6e7ca0510d14fc65fa3 to your computer and use it in GitHub Desktop.
Snippets
{
"typescriptFunctionalComponent": {
"prefix": "rfc",
"body": [
"import React from 'react';",
"",
"// import { Container } from './styles';",
"",
"interface Props {",
"",
"}",
"",
"const ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}} = (props: Props): JSX.Element => {",
" return (",
" <div>",
" <h1>${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}}</h1>",
" </div>",
" );",
"};",
"",
"export default ${1:${TM_DIRECTORY/^.*(\\/|\\\\)([^(\\/|\\\\)]+)$/$2/}};",
"",
],
"description": "Create ReactJS Functional Component with Typescript"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment