Skip to content

Instantly share code, notes, and snippets.

@fhugoduarte
Last active September 26, 2020 14:09
Embed
What would you like to do?
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