|
4 | 4 | "body": [ |
5 | 5 | "import * as React from 'react';", |
6 | 6 | "", |
7 | | - "export interface ${1:IApp}Props {", |
| 7 | + "export interface I${1:App}Props {", |
8 | 8 | "}", |
9 | 9 | "", |
10 | | - "export default class ${1:} extends React.Component<${1:}Props, any> {", |
| 10 | + "export default class ${1:} extends React.Component<I${1:}Props, any> {", |
11 | 11 | " public render() {", |
12 | 12 | " return (", |
13 | 13 | " <div>", |
|
25 | 25 | "body": [ |
26 | 26 | "import * as React from 'react';", |
27 | 27 | "", |
28 | | - "export interface ${1:IApp}Props {", |
| 28 | + "export interface I${1:App}Props {", |
29 | 29 | "}", |
30 | 30 | "", |
31 | | - "export interface ${1:IApp}State {", |
| 31 | + "export interface I${1:App}State {", |
32 | 32 | "}", |
33 | 33 | "", |
34 | | - "export default class ${1:} extends React.Component<${1:}Props, ${1:}State> {", |
35 | | - " constructor(props: ${1:}Props) {", |
| 34 | + "export default class ${1:} extends React.Component<I${1:}Props, ${1:}State> {", |
| 35 | + " constructor(props: I${1:}Props) {", |
36 | 36 | " super(props);", |
37 | 37 | "", |
38 | 38 | " this.state = {", |
|
54 | 54 | "React Component without import and export": { |
55 | 55 | "prefix": "tsrcjc", |
56 | 56 | "body": [ |
57 | | - "export interface ${1:IApp}Props {", |
| 57 | + "export interface I${1:App}Props {", |
58 | 58 | "}", |
59 | 59 | "", |
60 | | - "class ${1:} extends React.Component<${1:}Props, any> {", |
| 60 | + "class ${1:} extends React.Component<I${1:}Props, any> {", |
61 | 61 | " public render() {", |
62 | 62 | " return (", |
63 | 63 | " <div>", |
|
75 | 75 | "body": [ |
76 | 76 | "import * as React from 'react';", |
77 | 77 | "", |
78 | | - "export interface ${1:IApp}Props {", |
| 78 | + "export interface I${1:App}Props {", |
79 | 79 | "}", |
80 | 80 | "", |
81 | | - "export default class ${1:} extends React.PureComponent<${1:}Props, any> {", |
| 81 | + "export default class ${1:} extends React.PureComponent<I${1:}Props, any> {", |
82 | 82 | " public render() {", |
83 | 83 | " return (", |
84 | 84 | " <div>", |
|
94 | 94 | "React PureComponent without import and export": { |
95 | 95 | "prefix": "tsrpcjc", |
96 | 96 | "body": [ |
97 | | - "export interface ${1:IApp}Props {", |
| 97 | + "export interface I${1:App}Props {", |
98 | 98 | "}", |
99 | 99 | "", |
100 | | - "class ${1:} extends React.PureComponent<${1:}Props, any> {", |
| 100 | + "class ${1:} extends React.PureComponent<I${1:}Props, any> {", |
101 | 101 | " public render() {", |
102 | 102 | " return (", |
103 | 103 | " <div>", |
|
115 | 115 | "body": [ |
116 | 116 | "import * as React from 'react';", |
117 | 117 | "", |
118 | | - "export interface ${1:IApp}Props {", |
| 118 | + "export interface I${1:App}Props {", |
119 | 119 | "}", |
120 | 120 | "", |
121 | | - "export function ${1:} (props: ${1:}Props) {", |
| 121 | + "export function ${1:} (props: I${1:}Props) {", |
122 | 122 | " return (", |
123 | 123 | " <div>", |
124 | 124 | " ${0}", |
|
134 | 134 | "body": [ |
135 | 135 | "import * as React from 'react';", |
136 | 136 | "", |
137 | | - "interface ${1:IApp}Props {$2", |
| 137 | + "interface I${1:App}Props {$2", |
138 | 138 | "}", |
139 | 139 | "", |
140 | | - "const $1: React.FunctionComponent<$1Props> = (props) => {", |
| 140 | + "const ${1:}: React.FunctionComponent<I${1:}Props> = (props) => {", |
141 | 141 | " return $0;", |
142 | 142 | "};", |
143 | 143 | "", |
144 | | - "export default $1;" |
| 144 | + "export default ${1:};" |
145 | 145 | ], |
146 | 146 | "description": "Create a React Stateless Functional Component." |
147 | 147 | }, |
|
258 | 258 | "import * as React from 'react';", |
259 | 259 | "import { connect } from 'react-redux'", |
260 | 260 | "", |
261 | | - "export interface ${1:IApp}Props {", |
| 261 | + "export interface I${1:App}Props {", |
262 | 262 | "}", |
263 | 263 | "", |
264 | | - "class ${1:} extends React.Component<${1:}Props, any> {", |
| 264 | + "class ${1:} extends React.Component<I${1:}Props, any> {", |
265 | 265 | " public render() {", |
266 | 266 | " return (", |
267 | 267 | " <div>", |
|
0 commit comments