typing the prefix name and pressing tab will create the code base.
{
// Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
"Create Component Function": {
"prefix": "ccf",
"body": [
"import * as React from 'react';",
"import * as PropTypes from 'prop-types';",
"interface Props {",
" ${1:VarName}?:string",
"}",
"const ${2:ComponentName}: React.SFC<Props> = ({ ${1:VarName} }) => (",
" <div>{${1:VarName}}</div>",
");",
"${2:ComponentName}.propTypes = {",
" ${1:VarName}: PropTypes.string",
"};",
"export { ${2:ComponentName} };"
],
"description": "React Component Typescript Presentational"
}
}