Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/infeng/vscode-react-typescript
https://github.com/infeng/vscode-react-typescript
react typescript vscode vscode-extension
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/infeng/vscode-react-typescript
- Owner: infeng
- License: mit
- Created: 2017-02-10T04:03:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-17T03:40:40.000Z (over 5 years ago)
- Last Synced: 2024-10-01T15:32:16.539Z (4 months ago)
- Topics: react, typescript, vscode, vscode-extension
- Size: 47.9 KB
- Stars: 40
- Watchers: 4
- Forks: 41
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vscode-react-typescript
-------------------
This extension contains code snippets for React with Typescript.
## Installation
In order to install an extension you need to launch the Command Pallete (Ctrl + Shift + P or Cmd + Shift + P) and type Extensions.
There you have either the option to show the already installed snippets or install new ones.Launch VS Code Quick Open (Ctrl + P or Cmd + P), paste the following command, and press enter.
`ext install vscode-react-typescript`
Alternatively you can open the extensions panel and search for 'Typescript React code snippets'.
## Supported languages (file extensions)
* TypeScript (.ts)
* TypeScript React (.tsx)## Snippets
Below is a list of all available snippets and the triggers of each one. The **⇥** means the `TAB` key.
| Trigger | Content |
| -------: | ------- |
| `tsrcc→` | `class component skeleton` |
| `tsrcfull→` | `class component skeleton with Props, State, and constructor` |
| `tsrcjc→`| `class component skeleton without import and default export lines` |
| `tsrpcc→`| `class purecomponent skeleton` |
| `tsrpcjc→` | `class purecomponent without import and default export lines` |
| `tsrpfc` | `pure function component skeleton` |
| `tsdrpfc` | `stateless functional component with default export` |
| `tsrsfc` | `stateless functional component` |
| `conc→` | `class default constructor with props and context` |
| `cwm→` | `componentWillMount method` |
| `ren→` | `render method` |
| `cdm→` | `componentDidMount method` |
| `cwrp→` | `componentWillReceiveProps method` |
| `scu→` | `shouldComponentUpdate method` |
| `cwu→` | `componentWillUpdate method` |
| `cdu→` | `componentDidUpdate method` |
| `cwum→` | `componentWillUnmount method` |
| `gdsfp→` | `getDerivedStateFromProps method` |
| `gsbu` | `getSnapshotBeforeUpdate method` |
| `sst→` | `this.setState with object as parameter` |
| `bnd→` | `binds the this of method inside the constructor` |
| `met→` | `simple method` |
| `tscntr→` | `react redux container skeleton` |
| `imt` | `create a import` |## License
MIT