├── .gitattributes ├── .github ├── CONTRIBUTING.md └── ISSUE_TEMPLATE.md ├── .gitignore ├── LICENSE ├── README.md ├── ReactSnippetPack.sln ├── appveyor.yml ├── art ├── react-snippet-pack.gif └── snippet-manager.png └── src ├── ReactSnippetPack.csproj ├── Resources ├── Icon.png └── Preview.png ├── Snippets ├── ReactSnippetPack │ ├── cdm.snippet │ ├── cdm6.snippet │ ├── cdup.snippet │ ├── cwm.snippet │ ├── cwm6.snippet │ ├── cwr.snippet │ ├── cwr6.snippet │ ├── cwu.snippet │ ├── cwu6.snippet │ ├── cwun.snippet │ ├── cwun6.snippet │ ├── cx.snippet │ ├── fup.snippet │ ├── gdp.snippet │ ├── gis.snippet │ ├── ism.snippet │ ├── props.snippet │ ├── props6.snippet │ ├── pt.snippet │ ├── pt6.snippet │ ├── rcc.snippet │ ├── rcc6.snippet │ ├── ren.snippet │ ├── ren6.snippet │ ├── rrc.snippet │ ├── scu.snippet │ ├── scu6.snippet │ ├── sst.snippet │ ├── state.snippet │ └── trp.snippet └── snippets.pkgdef └── source.extension.vsixmanifest /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Looking to contribute something? **Here's how you can help.** 4 | 5 | Please take a moment to review this document in order to make the contribution 6 | process easy and effective for everyone involved. 7 | 8 | Following these guidelines helps to communicate that you respect the time of 9 | the developers managing and developing this open source project. In return, 10 | they should reciprocate that respect in addressing your issue or assessing 11 | patches and features. 12 | 13 | 14 | ## Using the issue tracker 15 | 16 | The issue tracker is the preferred channel for [bug reports](#bug-reports), 17 | [features requests](#feature-requests) and 18 | [submitting pull requests](#pull-requests), but please respect the 19 | following restrictions: 20 | 21 | * Please **do not** use the issue tracker for personal support requests. Stack 22 | Overflow is a better place to get help. 23 | 24 | * Please **do not** derail or troll issues. Keep the discussion on topic and 25 | respect the opinions of others. 26 | 27 | * Please **do not** open issues or pull requests which *belongs to* third party 28 | components. 29 | 30 | 31 | ## Bug reports 32 | 33 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 34 | Good bug reports are extremely helpful, so thanks! 35 | 36 | Guidelines for bug reports: 37 | 38 | 1. **Use the GitHub issue search** — check if the issue has already been 39 | reported. 40 | 41 | 2. **Check if the issue has been fixed** — try to reproduce it using the 42 | latest `master` or development branch in the repository. 43 | 44 | 3. **Isolate the problem** — ideally create an 45 | [SSCCE](http://www.sscce.org/) and a live example. 46 | Uploading the project on cloud storage (OneDrive, DropBox, et el.) 47 | or creating a sample GitHub repository is also helpful. 48 | 49 | 50 | A good bug report shouldn't leave others needing to chase you up for more 51 | information. Please try to be as detailed as possible in your report. What is 52 | your environment? What steps will reproduce the issue? What browser(s) and OS 53 | experience the problem? Do other browsers show the bug differently? What 54 | would you expect to be the outcome? All these details will help people to fix 55 | any potential bugs. 56 | 57 | Example: 58 | 59 | > Short and descriptive example bug report title 60 | > 61 | > A summary of the issue and the Visual Studio, browser, OS environments 62 | > in which it occurs. If suitable, include the steps required to reproduce the bug. 63 | > 64 | > 1. This is the first step 65 | > 2. This is the second step 66 | > 3. Further steps, etc. 67 | > 68 | > `` - a link to the project/file uploaded on cloud storage or other publicly accessible medium. 69 | > 70 | > Any other information you want to share that is relevant to the issue being 71 | > reported. This might include the lines of code that you have identified as 72 | > causing the bug, and potential solutions (and your opinions on their 73 | > merits). 74 | 75 | 76 | ## Feature requests 77 | 78 | Feature requests are welcome. But take a moment to find out whether your idea 79 | fits with the scope and aims of the project. It's up to *you* to make a strong 80 | case to convince the project's developers of the merits of this feature. Please 81 | provide as much detail and context as possible. 82 | 83 | 84 | ## Pull requests 85 | 86 | Good pull requests, patches, improvements and new features are a fantastic 87 | help. They should remain focused in scope and avoid containing unrelated 88 | commits. 89 | 90 | **Please ask first** before embarking on any significant pull request (e.g. 91 | implementing features, refactoring code, porting to a different language), 92 | otherwise you risk spending a lot of time working on something that the 93 | project's developers might not want to merge into the project. 94 | 95 | Please adhere to the [coding guidelines](#code-guidelines) used throughout the 96 | project (indentation, accurate comments, etc.) and any other requirements 97 | (such as test coverage). 98 | 99 | Adhering to the following process is the best way to get your work 100 | included in the project: 101 | 102 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, 103 | and configure the remotes: 104 | 105 | ```bash 106 | # Clone your fork of the repo into the current directory 107 | git clone https://github.com//.git 108 | # Navigate to the newly cloned directory 109 | cd 110 | # Assign the original repo to a remote called "upstream" 111 | git remote add upstream https://github.com/madskristensen/.git 112 | ``` 113 | 114 | 2. If you cloned a while ago, get the latest changes from upstream: 115 | 116 | ```bash 117 | git checkout master 118 | git pull upstream master 119 | ``` 120 | 121 | 3. Create a new topic branch (off the main project development branch) to 122 | contain your feature, change, or fix: 123 | 124 | ```bash 125 | git checkout -b 126 | ``` 127 | 128 | 4. Commit your changes in logical chunks. Please adhere to these [git commit 129 | message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 130 | or your code is unlikely be merged into the main project. Use Git's 131 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 132 | feature to tidy up your commits before making them public. Also, prepend name of the feature 133 | to the commit message. For instance: "SCSS: Fixes compiler results for IFileListener.\nFixes `#123`" 134 | 135 | 5. Locally merge (or rebase) the upstream development branch into your topic branch: 136 | 137 | ```bash 138 | git pull [--rebase] upstream master 139 | ``` 140 | 141 | 6. Push your topic branch up to your fork: 142 | 143 | ```bash 144 | git push origin 145 | ``` 146 | 147 | 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) 148 | with a clear title and description against the `master` branch. 149 | 150 | 151 | ## Code guidelines 152 | 153 | - Always use proper indentation. 154 | - In Visual Studio under `Tools > Options > Text Editor > C# > Advanced`, make sure 155 | `Place 'System' directives first when sorting usings` option is enabled (checked). 156 | - Before committing, organize usings for each updated C# source file. Either you can 157 | right-click editor and select `Organize Usings > Remove and sort` OR use extension 158 | like [BatchFormat](http://visualstudiogallery.msdn.microsoft.com/a7f75c34-82b4-4357-9c66-c18e32b9393e). 159 | - Before committing, run Code Analysis in `Debug` configuration and follow the guidelines 160 | to fix CA issues. Code Analysis commits can be made separately. 161 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Installed product versions 2 | - Visual Studio: [example 2015 Professional] 3 | - This extension: [example 1.1.21] 4 | 5 | ### Description 6 | Replace this text with a short description 7 | 8 | ### Steps to recreate 9 | 1. Replace this 10 | 2. text with 11 | 3. the steps 12 | 4. to recreate 13 | 14 | ### Current behavior 15 | Explain what it's doing and why it's wrong 16 | 17 | ### Expected behavior 18 | Explain what it should be doing after it's fixed. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | 4 | .vs 5 | bin 6 | obj -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015 Mads Kristensen 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## ReactJS Snippet Pack for Visual Studio 2 | 3 | [![Build status](https://ci.appveyor.com/api/projects/status/7l4iyu356ci5yy2u?svg=true)](https://ci.appveyor.com/project/madskristensen/reactsnippetpack) 4 | 5 | A snippet pack to make you more productive working with React.js. 6 | Based on the snippets from the [Atom React Plugin](http://orktes.github.io/atom-react/). 7 | 8 | Download this extension from the [VS Gallery](https://visualstudiogallery.msdn.microsoft.com/234d79e9-f0fd-41e1-a926-850da8e8c7d7) 9 | or get the [nightly build](http://vsixgallery.com/extension/a7dff10f-3592-429c-9dc1-622fe517921d/). 10 | 11 | ![React Snippet Pack](art/react-snippet-pack.gif) 12 | 13 | Snippets include commonly used React specific boilerplate. 14 | 15 | ![Snippet manager](art/snippet-manager.png) 16 | 17 | The snippets match the ones found here: http://orktes.github.io/atom-react/#snippets-list 18 | 19 | Here's the full list: 20 | 21 | - `cdm` - componentDidMount: fn() { ... } 22 | - `cdm6` - ES6 version 23 | - `cdup` - componentDidUpdate: fn(pp, ps) { ... } 24 | - `cwm` - componentWillMount: fn() { ... } 25 | - `cwm6` - ES6 version 26 | - `cwr` - componentWillReceiveProps: fn(np) { ... } 27 | - `cwun` - componentWillUnmount: fn() { ... } 28 | - `cwun6` - ES6 version 29 | - `cwu` - componentWillUpdate: fn(np, ns) { ... } 30 | - `cwu6` - ES6 version 31 | - `cx` - cx({ ... }) 32 | - `fup` - forceUpdate(...) 33 | - `gdp` - getDefaultProps: fn() { return {...} } 34 | - `gis` - getInitialState: fn() { return {...} } 35 | - `ism` - isMounted() 36 | - `pt` - propTypes { ... } 37 | - `pt6` - ES6 version 38 | - `rcc` - component skeleton 39 | - `rcc6` - ES6 version 40 | - `ren` - render: fn() { return ... } 41 | - `ren6` - ES6 version 42 | - `sst` - setState({ ... }) 43 | - `scu` - shouldComponentUpdate: fn(np, ns) { ... } 44 | - `scu6` - ES6 version 45 | - `props` - this.props. 46 | - `props6` - ES6 version 47 | - `state` - this.state. 48 | - `trp` - transferPropsTo( ... ) 49 | - `rrc` - render(component, container, [callback]) -------------------------------------------------------------------------------- /ReactSnippetPack.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.25921.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactSnippetPack", "src\ReactSnippetPack.csproj", "{5C843AF8-1088-4655-A572-0729269E8A98}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6F24CC8F-8D9C-4384-A39D-2248CC465F03}" 9 | ProjectSection(SolutionItems) = preProject 10 | appveyor.yml = appveyor.yml 11 | README.md = README.md 12 | EndProjectSection 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Release|Any CPU = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {5C843AF8-1088-4655-A572-0729269E8A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {5C843AF8-1088-4655-A572-0729269E8A98}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {5C843AF8-1088-4655-A572-0729269E8A98}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {5C843AF8-1088-4655-A572-0729269E8A98}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | image: Visual Studio 2017 RC 2 | 3 | install: 4 | - ps: (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex 5 | 6 | before_build: 7 | - ps: Vsix-IncrementVsixVersion | Vsix-UpdateBuildVersion 8 | 9 | build_script: 10 | - msbuild /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m 11 | 12 | after_test: 13 | - ps: Vsix-PushArtifacts | Vsix-PublishToGallery 14 | 15 | before_deploy: 16 | - ps: Vsix-CreateChocolatyPackage -packageId reactsnippetpack 17 | 18 | deploy: 19 | - provider: Environment 20 | name: Chocolatey 21 | on: 22 | branch: master 23 | appveyor_repo_commit_message_extended: /\[release\]/ -------------------------------------------------------------------------------- /art/react-snippet-pack.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ReactSnippetPack/20a07f62743a7598effeb8e1d1bb0c7bb57eafdc/art/react-snippet-pack.gif -------------------------------------------------------------------------------- /art/snippet-manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ReactSnippetPack/20a07f62743a7598effeb8e1d1bb0c7bb57eafdc/art/snippet-manager.png -------------------------------------------------------------------------------- /src/ReactSnippetPack.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(VisualStudioVersion) 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | Debug 10 | AnyCPU 11 | 2.0 12 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 13 | {5C843AF8-1088-4655-A572-0729269E8A98} 14 | Library 15 | ReactSnippetPack 16 | ReactSnippetPack 17 | v4.5 18 | false 19 | false 20 | false 21 | false 22 | false 23 | false 24 | Program 25 | $(DevEnvDir)\devenv.exe 26 | /rootsuffix Exp 27 | Normal 28 | 29 | 30 | true 31 | full 32 | false 33 | bin\Debug\ 34 | DEBUG;TRACE 35 | prompt 36 | 4 37 | 38 | 39 | pdbonly 40 | true 41 | bin\Release\ 42 | TRACE 43 | prompt 44 | 4 45 | 46 | 47 | 48 | true 49 | 50 | 51 | true 52 | 53 | 54 | true 55 | 56 | 57 | true 58 | 59 | 60 | true 61 | 62 | 63 | true 64 | 65 | 66 | true 67 | 68 | 69 | true 70 | 71 | 72 | true 73 | 74 | 75 | true 76 | 77 | 78 | true 79 | 80 | 81 | true 82 | 83 | 84 | true 85 | 86 | 87 | true 88 | 89 | 90 | true 91 | 92 | 93 | true 94 | 95 | 96 | true 97 | 98 | 99 | true 100 | 101 | 102 | true 103 | 104 | 105 | true 106 | 107 | 108 | true 109 | 110 | 111 | true 112 | 113 | 114 | Resources\LICENSE 115 | true 116 | 117 | 118 | true 119 | 120 | 121 | true 122 | 123 | 124 | true 125 | 126 | 127 | true 128 | 129 | 130 | true 131 | 132 | 133 | true 134 | 135 | 136 | true 137 | 138 | 139 | true 140 | 141 | 142 | true 143 | 144 | 145 | true 146 | 147 | 148 | Designer 149 | 150 | 151 | 152 | 153 | true 154 | 155 | 156 | 157 | 158 | 165 | -------------------------------------------------------------------------------- /src/Resources/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ReactSnippetPack/20a07f62743a7598effeb8e1d1bb0c7bb57eafdc/src/Resources/Icon.png -------------------------------------------------------------------------------- /src/Resources/Preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madskristensen/ReactSnippetPack/20a07f62743a7598effeb8e1d1bb0c7bb57eafdc/src/Resources/Preview.png -------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cdm.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentDidMount: fn() { ... } 4 | Mads Kristensen 5 | cdm 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cdm6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentDidMount (ES6) 4 | Mads Kristensen 5 | cdm6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cdup.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentDidUpdate: fn(pp, ps) { ... } 4 | Mads Kristensen 5 | cdup 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cwm.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentWillMount: fn() { ... } 4 | Mads Kristensen 5 | cwm 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cwm6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentWillMount (ES6) 4 | Mads Kristensen 5 | cwm6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cwr.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentWillReceiveProps: fn(np) { ... } 4 | Mads Kristensen 5 | cwm 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cwr6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentWillReceiveProps (ES6) 4 | Mads Kristensen 5 | cwr6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cwu.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentWillUpdate: fn(np, ns) { ... } 4 | Mads Kristensen 5 | cx 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name 16 | name 17 | 18 | 19 | value 20 | Value 21 | value 22 | 23 | 24 | 25 | 28 | 29 | 30 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cwu6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentWillUpdate (ES6) 4 | Mads Kristensen 5 | cwu6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name 16 | name 17 | 18 | 19 | 20 | 23 | 24 | 25 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cwun.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentWillUnmount: fn() { ... } 4 | Mads Kristensen 5 | cwun 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cwun6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: componentWillUnmount (ES6) 4 | Mads Kristensen 5 | cwun6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/cx.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: cx({ ... }) 4 | Mads Kristensen 5 | cwu 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name of task 16 | name 17 | 18 | 19 | 20 | 23 | 24 | 25 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/fup.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: forceUpdate(...) 4 | Mads Kristensen 5 | fup 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | callback 15 | Callback 16 | callback 17 | 18 | 19 | 20 | 21 | 22 | 23 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/gdp.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: getDefaultProps: fn() { return {...} } 4 | Mads Kristensen 5 | gdp 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 18 | 19 | 20 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/gis.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: getInitialState: fn() { return {...} } 4 | Mads Kristensen 5 | gis 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name 16 | name 17 | 18 | 19 | value 20 | Value 21 | value 22 | 23 | 24 | 25 | 30 | 31 | 32 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/ism.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: isMounted() 4 | Mads Kristensen 5 | ism 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/props.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: this.props. 4 | Mads Kristensen 5 | props 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/props6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: this.props. (ES6) 4 | Mads Kristensen 5 | props6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/pt.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: propTypes { ... } 4 | Mads Kristensen 5 | pt 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name 16 | name 17 | 18 | 19 | 20 | 23 | 24 | 25 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/pt6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: propTypes (ES6) 4 | Mads Kristensen 5 | pt6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name 16 | name 17 | 18 | 19 | 20 | 23 | 24 | 25 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/rcc.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: component skeleton 4 | Mads Kristensen 5 | rcc 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name 16 | name 17 | 18 | 19 | 20 | 27 | ); 28 | } 29 | 30 | }); 31 | 32 | module.exports = $name$;]]> 33 | 34 | 35 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/rcc6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: component skeleton (ES6) 4 | Mads Kristensen 5 | rcc6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name 16 | name 17 | 18 | 19 | 20 | 31 | 32 | 33 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/ren.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: render: fn() { return ... } 4 | Mads Kristensen 5 | ren 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | ); 17 | }]]> 18 | 19 | 20 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/ren6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: render (ES6) 4 | Mads Kristensen 5 | ren6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | $end$ 16 | ); 17 | }]]> 18 | 19 | 20 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/rrc.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: render(component, container, [callback]) 4 | Mads Kristensen 5 | rrc 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | component 15 | Component 16 | component 17 | 18 | 19 | container 20 | Container 21 | document.body 22 | 23 | 24 | callback 25 | Callback 26 | callback 27 | 28 | 29 | 30 | , $container$, $callback$);]]> 31 | 32 | 33 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/scu.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: shouldComponentUpdate: fn(np, ns) { ... } 4 | Mads Kristensen 5 | scu 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/scu6.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: shouldComponentUpdate: fn(np, ns) { ... } 4 | Mads Kristensen 5 | scu6 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 16 | 17 | 18 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/sst.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: setState({ ... }) 4 | Mads Kristensen 5 | sst 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | name 15 | Name 16 | name 17 | 18 | 19 | value 20 | Value 21 | value 22 | 23 | 24 | 25 | 29 | 30 | 31 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/state.snippet: -------------------------------------------------------------------------------- 1 |  2 |
3 | React: this.state. 4 | Mads Kristensen 5 | state 6 | Code snippet for React 7 | 8 | Expansion 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 |
-------------------------------------------------------------------------------- /src/Snippets/ReactSnippetPack/trp.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 |
4 | React: transferPropsTo( ... ) 5 | Mads Kristensen 6 | trp 7 | Code snippet for React 8 | 9 | Expansion 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 |
-------------------------------------------------------------------------------- /src/Snippets/snippets.pkgdef: -------------------------------------------------------------------------------- 1 |  2 | ; VS 2012-2015 3 | [$RootKey$\Languages\CodeExpansions\JavaScript\Paths] 4 | "MySnippets"="$PackageFolder$\ReactSnippetPack" 5 | 6 | ; VS 2017 7 | [$RootKey$\Languages\CodeExpansions\TypeScript\Paths] 8 | "MySnippets"="$PackageFolder$\ReactSnippetPack" -------------------------------------------------------------------------------- /src/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React Snippet Pack 6 | Snippet pack for use with the React JavaScript framework 7 | https://github.com/madskristensen/ReactSnippetPack 8 | Resources\LICENSE 9 | Resources\Icon.png 10 | Resources\Preview.png 11 | React, JSX, JavaScript 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | --------------------------------------------------------------------------------