{"id":15489344,"url":"https://github.com/weffe/vscode-react-ts-snippets","last_synced_at":"2026-05-10T19:21:44.253Z","repository":{"id":57394118,"uuid":"168574238","full_name":"Weffe/vscode-react-ts-snippets","owner":"Weffe","description":"Opinionated code snippets for React with Typescript","archived":false,"fork":false,"pushed_at":"2019-03-14T16:54:07.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T07:02:00.273Z","etag":null,"topics":["react","snippets","typescript","vscode","vscode-snippets"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=weffe.vscode-react-ts-snippets","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Weffe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-31T18:25:00.000Z","updated_at":"2019-03-14T16:53:55.000Z","dependencies_parsed_at":"2022-09-26T17:00:45.940Z","dependency_job_id":null,"html_url":"https://github.com/Weffe/vscode-react-ts-snippets","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weffe%2Fvscode-react-ts-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weffe%2Fvscode-react-ts-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weffe%2Fvscode-react-ts-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Weffe%2Fvscode-react-ts-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Weffe","download_url":"https://codeload.github.com/Weffe/vscode-react-ts-snippets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246059336,"owners_count":20717085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react","snippets","typescript","vscode","vscode-snippets"],"created_at":"2024-10-02T07:05:08.662Z","updated_at":"2026-05-10T19:21:44.211Z","avatar_url":"https://github.com/Weffe.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# React + Typescript Code Snippets\n\n\u003e Forked from https://github.com/infeng/vscode-react-typescript\n\n-------------------\n\n[![version badge](https://img.shields.io/visual-studio-marketplace/v/weffe.vscode-react-ts-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=weffe.vscode-react-ts-snippets)\n\nThis extension contains opinionated code snippets for React with Typescript.\n\nVS Marketplace link: https://marketplace.visualstudio.com/items?itemName=weffe.vscode-react-ts-snippets\n\n## Installation\n\nIn order to install an extension you need to launch the Command Pallete (Ctrl + Shift + P or Cmd + Shift + P) and type Extensions.\nThere you have either the option to show the already installed snippets or install new ones.\n\nLaunch VS Code Quick Open (Ctrl + P or Cmd + P), paste the following command, and press enter.\n\n`ext install weffe.vscode-react-ts-snippets`\n\nAlternatively you can open the extensions panel and search for 'React + Typescript Code Snippets'.\n\n## Alternative Installation\n\nIf you want to manually install the snippets then simply copy the `snippets.json` content from here: https://raw.githubusercontent.com/Weffe/vscode-react-ts-snippets/master/snippets/snippets.json\n\nNext, in VS Code go to File -\u003e Preferences -\u003e User Snippets\n\nIn the popup window, search for `typescriptreact` and click on the option.\n\nFinally, this will take you to a new window where you can paste in the copied snippets and then save!\n\nNow, you will have access to the snippets across VS Code.\n\n## Supported languages (file extensions)\n\n* TypeScript (.ts)\n* TypeScript React (.tsx)\n\n## Snippets\n\nBelow is a list of all available snippets and the triggers of each one. The **⇥** means the `TAB` key.\n\n| Trigger  | Content |\n| -------: | ------- |\n| `tsrcc →`    | `class component skeleton` |\n| `tsrcfull →` | `class component skeleton with Props, State, and constructor` |\n| `tsrcjc →`   | `class component skeleton without import and default export lines` |\n| `tsrpcc →`   | `class purecomponent skeleton` |\n| `tsrpcjc →`  | `class purecomponent without import and default export lines` |\n| `tsrpfc →`   | `pure function component skeleton` |\n| `tsrpfcwh →` | `pure function component skeleton with hooks` |\n| `tsrfc →`    | `functional component skeleton` |\n| `conc →`     | `class default constructor with props and context` |\n| `cwm →`      | `componentWillMount method` |\n| `ren →`      | `render method` |\n| `cdm →`      | `componentDidMount method` |\n| `cwrp →`     | `componentWillReceiveProps method` |\n| `scu →`      | `shouldComponentUpdate method` |\n| `cwu →`      | `componentWillUpdate method` |\n| `cdu →`      | `componentDidUpdate method` |\n| `cwum →`     | `componentWillUnmount method` |\n| `gdsfp →`    | `getDerivedStateFromProps method` |\n| `gsbu →`     | `getSnapshotBeforeUpdate method` |\n| `sst →`      | `this.setState with object as parameter` |\n| `bnd →`      | `binds the this of method inside the constructor` |\n| `met →`      | `simple method` |\n| `imt →`      | `import a dependency` |\n| `imta →`     | `import everything from a dependency` |\n| `imtd →`     | `import default object from a dependency` |\n| `tsrcm →`    | `Create a React + MobX Component` |\n| `tsrcmfull →`| `Create a stateful React + MobX Component` |\n| `tsrcmrr →`  | `Create a React + MobX + React-Router Component` |\n| `tsrcmrrfull →`    | `Create a stateful React + MobX + React-Router Component` |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweffe%2Fvscode-react-ts-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweffe%2Fvscode-react-ts-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweffe%2Fvscode-react-ts-snippets/lists"}