vscode scnippet for ts-react
This commit is contained in:
parent
b00db4983d
commit
c78b4c64e4
24
.config/Code - OSS/User/snippets/typescriptreact.json
Normal file
24
.config/Code - OSS/User/snippets/typescriptreact.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"Component": {
|
||||
"prefix": "comp",
|
||||
"description": "Default react component",
|
||||
"body": [
|
||||
"import * as React from \"react\";",
|
||||
"",
|
||||
"class $1 extends React.Component {",
|
||||
"\tconstructor(props) {",
|
||||
"\t\tsuper(props);",
|
||||
"\t}",
|
||||
"",
|
||||
"\trender(): JSX.Element {",
|
||||
"\t\treturn <div>",
|
||||
"\t\t\tMy $1",
|
||||
"\t\t</div>;",
|
||||
"\t}",
|
||||
"",
|
||||
"}",
|
||||
"",
|
||||
"export default $1;"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user