File tree 3 files changed +36
-4
lines changed
3 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ Below is a list of all available snippets and the triggers of each one. The **
27
27
| Trigger | Content |
28
28
| -------: | ------- |
29
29
| ` tsrcc→ ` | ` class component skeleton ` |
30
+ | ` tsrcfull→ ` | ` class component skeleton with Props, State, and constructor ` |
30
31
| ` tsrcjc→ ` | ` class component skeleton without import and default export lines ` |
31
32
| ` tsrpcc→ ` | ` class purecomponent skeleton ` |
32
33
| ` tsrpcjc→ ` | ` class purecomponent without import and default export lines ` |
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vscode-react-typescript" ,
3
- "version" : " 1.0.10 " ,
3
+ "version" : " 1.0.20 " ,
4
4
"description" : " Code snippets for react in typescript" ,
5
5
"displayName" : " Typescript React code snippets" ,
6
6
"publisher" : " infeng" ,
Original file line number Diff line number Diff line change 20
20
],
21
21
"description" : " Create a React Component with typescript."
22
22
},
23
+ "React Component - Full" : {
24
+ "prefix" : " tsrcfull" ,
25
+ "body" : [
26
+ " import * as React from 'react';" ,
27
+ " " ,
28
+ " export interface ${1:App}Props {" ,
29
+ " }" ,
30
+ " " ,
31
+ " export interface ${1:App}State {" ,
32
+ " }" ,
33
+ " " ,
34
+ " export default class ${1:} extends React.Component<${1:}Props, ${1:}State> {" ,
35
+ " constructor(props: ${1:}Props) {" ,
36
+ " super();" ,
37
+ " " ,
38
+ " this.state = {" ,
39
+ " }" ,
40
+ " }" ,
41
+ " " ,
42
+ " render() {" ,
43
+ " return (" ,
44
+ " <div>" ,
45
+ " ${2:}" ,
46
+ " </div>" ,
47
+ " );" ,
48
+ " }" ,
49
+ " }" ,
50
+ " "
51
+ ],
52
+ "description" : " Create a stateful React Component with typescript with Props, State, and a constructor."
53
+ },
23
54
"React Component without import and export" : {
24
55
"prefix" : " tsrcjc" ,
25
56
"body" : [
26
57
" export interface ${1:App}Props {" ,
27
58
" }" ,
28
- " " ,
59
+ " " ,
29
60
" class ${1:} extends React.Component<${1:}Props, any> {" ,
30
61
" render() {" ,
31
62
" return (" ,
65
96
"body" : [
66
97
" export interface ${1:App}Props {" ,
67
98
" }" ,
68
- " " ,
99
+ " " ,
69
100
" class ${1:} extends React.PureComponent<${1:}Props, any> {" ,
70
101
" render() {" ,
71
102
" return (" ,
86
117
" " ,
87
118
" export interface ${1:App}Props {" ,
88
119
" }" ,
89
- " " ,
120
+ " " ,
90
121
" export function ${1:} (props: ${1:}Props) {" ,
91
122
" return (" ,
92
123
" <div>" ,
You can’t perform that action at this time.
0 commit comments