Last active
September 26, 2020 14:09
-
-
Save fhugoduarte/9a48011ac0afa6e7ca0510d14fc65fa3 to your computer and use it in GitHub Desktop.
Snippets
This file contains hidden or 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
{ | |
"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