Skip to content

grolig/vscode-react-typescript

 
 

Repository files navigation

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-mobx-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
tsrcfull→ class component skeleton with Props, State, and constructor
tsrsfc stateless functional component
tsrsfcm stateless mobx functional component
conc→ class default constructor with props and context
ren→ render method
cdm→ componentDidMount method
cwrp→ componentWillReceiveProps method
scu→ shouldComponentUpdate method
cdu→ componentDidUpdate method
cwum→ componentWillUnmount method
gdsfp→ getDerivedStateFromProps method
gsbu getSnapshotBeforeUpdate method
sst→ this.setState with object as parameter
met→ simple method
tsmst mobx store skeleton
tsmobs mobx observable skeleton
imt create a import

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published