Skip to content

Commit

Permalink
Merge pull request #20 from linonetwo/add-default-export
Browse files Browse the repository at this point in the history
Add default exported version of tsrpfc
  • Loading branch information
infeng authored Apr 22, 2019
2 parents 60aa0f4 + 52f2022 commit eff22aa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vscode-react-typescript",
"version": "1.1.0",
"version": "1.2.0",
"description": "Code snippets for react in typescript",
"displayName": "Typescript React code snippets",
"publisher": "infeng",
Expand Down
19 changes: 19 additions & 0 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,25 @@
],
"description": "Create a React Pure Function Component."
},
"Export Default React Pure Function Component": {
"prefix": "tsdrpfc",
"body": [
"import * as React from 'react';",
"",
"export interface I${1:App}Props {",
"}",
"",
"export default function ${1:} (props: I${1:}Props) {",
" return (",
" <div>",
" ${0}",
" </div>",
" );",
"}",
""
],
"description": "Create a default-exported React Pure Function Component."
},
"React Stateless Functional Component": {
"prefix": "tsrsfc",
"body": [
Expand Down

0 comments on commit eff22aa

Please sign in to comment.