<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mohammad Reza Ghasemi</title>
    <description>The latest articles on DEV Community by Mohammad Reza Ghasemi (@luckydevboy).</description>
    <link>https://dev.to/luckydevboy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F486948%2F67073556-d605-4228-ada9-79b6c2ddb0cf.png</url>
      <title>DEV Community: Mohammad Reza Ghasemi</title>
      <link>https://dev.to/luckydevboy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luckydevboy"/>
    <language>en</language>
    <item>
      <title>Removing sensitive data from the git history</title>
      <dc:creator>Mohammad Reza Ghasemi</dc:creator>
      <pubDate>Sun, 05 Dec 2021 09:24:03 +0000</pubDate>
      <link>https://dev.to/luckydevboy/removing-sensitive-data-from-the-git-history-3p94</link>
      <guid>https://dev.to/luckydevboy/removing-sensitive-data-from-the-git-history-3p94</guid>
      <description>&lt;p&gt;Perhaps you saved sensitive data like a password or a token in your project. From a security point of view, it’s a bad practice to put them in your code directly and keep them in the repository. For example, the best approach in the Node.js app and other languages is to save sensitive data in the environment variables. So it is kept in a separate file called &lt;code&gt;.env&lt;/code&gt;. Not to be tracked by Git, it is added to &lt;code&gt;.gitignore&lt;/code&gt;. But if you check your previous commits, you will see that sensitive data exists in the git history. So what should be done now?!&lt;/p&gt;




&lt;p&gt;You have two options: &lt;a href="https://git-scm.com/docs/git-filter-branch" rel="noopener noreferrer"&gt;Git built-in command&lt;/a&gt; &lt;code&gt;git filter-branch&lt;/code&gt; or &lt;a href="https://rtyley.github.io/bfg-repo-cleaner/" rel="noopener noreferrer"&gt;BFG Repo-Cleaner tool&lt;/a&gt;. In this article, I want to show how to use the BFG Repo-Cleaner tool to rewrite your repository’s history.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The BFG Repo-Cleaner is a tool that’s built and maintained by the open-source community. It provides a faster, simpler alternative to &lt;code&gt;git filter-branch&lt;/code&gt; for removing unwanted data. (&lt;a href="https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository#using-the-bfg" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;






&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;mongoose&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mongodb+srv://user&amp;lt;password&amp;gt;@cluster0.fzrkd.mongodb.net/myFirstDatabase?retryWrites=true&amp;amp;w=majority&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;useNewUrlParser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;useCreateIndex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;useFindAndModify&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;useUnifiedTopology&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DB connection successful!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code is a part of a Node.js app that allows you to connect to the MongoDB Atlas via mongoose driver. For that, you need a connection string that has been bold in that code. That connection string is a sample of sensitive data.&lt;/p&gt;

&lt;p&gt;At first, create a file &lt;code&gt;.env&lt;/code&gt;.local to save your connection string in a variable called &lt;code&gt;DATABASE&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DATABASE=mongodb+srv://user&amp;lt;password&amp;gt;@cluster0.fzrkd.mongodb.net/myFirstDatabase?retryWrites=true&amp;amp;w=majority
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then replace that connection string with the one in &lt;code&gt;.env.local&lt;/code&gt; as &lt;code&gt;process.env.DATABASE&lt;/code&gt; in your code like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;mongoose&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DATABASE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;useNewUrlParser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;useCreateIndex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;useFindAndModify&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;useUnifiedTopology&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DB connection successful!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Node.js, you can access environment variables through &lt;code&gt;process&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You will commit the changes, although previous ones show the connection string right in the code. To replace that connection string with &lt;code&gt;process.env.DATABASE&lt;/code&gt; the rest of the commits should be followed by these instructions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If in a macOS, you can use Homebrew to install the BFG Repo-Cleaner tool: &lt;code&gt;brew install bfg&lt;/code&gt; and if in Windows, use Chocolatey: &lt;code&gt;choco install bfg-repo-cleaner&lt;/code&gt; or download its jar file from their &lt;a href="https://rtyley.github.io/bfg-repo-cleaner/" rel="noopener noreferrer"&gt;site&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replace the sensitive data with the one you want, then commit your changes. Don’t forget this step. In this case, replace &lt;code&gt;mongodb+srv://user&amp;lt;password&amp;gt;@cluster0.fzrkd.mongodb.net/myFirstDatabase?retryWrites=true&amp;amp;w=majority&lt;/code&gt; with &lt;code&gt;process.env.DATABASE&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a text file (e.x. &lt;code&gt;replacements.txt&lt;/code&gt;) to the substitutions. According to &lt;a href="https://stackoverflow.com/a/15730571/7515532" rel="noopener noreferrer"&gt;Tyle answered in StackOverflow&lt;/a&gt;, in this case, the text file contains:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DATABASE=mongodb+srv://user&amp;lt;password&amp;gt;@cluster0.fzrkd.mongodb.net/myFirstDatabase?retryWrites=true&amp;amp;w=majority==&amp;gt;process.env.DATABASE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Then run the below code from your project folder. If you installed BFG through its jar file from their site, replace the &lt;code&gt;bfg&lt;/code&gt; command with &lt;code&gt;java -jar bfg.jar&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bfg --replace-text replacements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;After getting the “BFG run is complete!” message, run this code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reflog expire --expire=now --all &amp;amp;&amp;amp; git gc --prune=now --aggressive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now check your previous commits, and you will see the replacements overall in the repository.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>What are Snippets in VSCode?</title>
      <dc:creator>Mohammad Reza Ghasemi</dc:creator>
      <pubDate>Fri, 03 Dec 2021 12:40:22 +0000</pubDate>
      <link>https://dev.to/luckydevboy/what-are-snippets-in-vscode-1cfp</link>
      <guid>https://dev.to/luckydevboy/what-are-snippets-in-vscode-1cfp</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements. (&lt;a href="https://code.visualstudio.com/docs/editor/userdefinedsnippets" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example, in JavaScript, instead of inserting &lt;code&gt;console.log(’Hello World…’)&lt;/code&gt; you can use VSCode built-in snippet &lt;code&gt;log&lt;/code&gt; by inserting it, then press the tab button to show that entirely on the editor. There are many other built-in snippets on the VSCode that you can use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Press &lt;code&gt;shift+cmd+p&lt;/code&gt; in Mac or &lt;code&gt;shift+ctrl+p&lt;/code&gt; in Windows to open the Command Palette.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Insert &lt;code&gt;Insert Snippet&lt;/code&gt; command in the Command Palette to get a list of the snippets for the language of the current file, then press the enter button to see them.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;blockquote&gt;
&lt;p&gt;Many &lt;a href="https://code.visualstudio.com/docs/editor/extension-marketplace" rel="noopener noreferrer"&gt;extensions&lt;/a&gt; on the &lt;a href="https://marketplace.visualstudio.com/vscode" rel="noopener noreferrer"&gt;VS Code Marketplace&lt;/a&gt; include snippets. You can search for extensions that contain snippets in the Extensions view (&lt;code&gt;shift+cmd+x&lt;/code&gt; in Mac or &lt;code&gt;shift+ctrl+x&lt;/code&gt; in Windows) using the &lt;code&gt;@category:"snippets"&lt;/code&gt; filter. (&lt;a href="https://code.visualstudio.com/docs/editor/userdefinedsnippets#_install-snippets-from-the-marketplace" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How to create your own snippets?
&lt;/h2&gt;

&lt;p&gt;I’m working with React, and there is a popular snippet extension for React on the VS Code Marketplace, but most of its snippets are useless for me. So I prefer to create my own snippets instead.&lt;/p&gt;

&lt;p&gt;I want to create a React TypeScript component snippet which takes its name from the file name:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open the Command Palette by pressing &lt;code&gt;shift+cmd+p&lt;/code&gt; in Mac or &lt;code&gt;shift+ctrl+p&lt;/code&gt; in Windows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Insert &lt;code&gt;configure user snippets&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the language for which the snippets &lt;br&gt;
should appear.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For example, to create a snippet for a React &lt;br&gt;
TypeScript file, choose &lt;code&gt;typescriptreact&lt;/code&gt; then press the enter button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VSCode will open a &lt;code&gt;***.json&lt;/code&gt; (&lt;code&gt;typescriptreact.json&lt;/code&gt; for the previous selection).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Insert the below attribute on the &lt;code&gt;***.json&lt;/code&gt; (&lt;code&gt;typescriptreact.json&lt;/code&gt;) object:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;React Arrow Function Component&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;prefix&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;trafc&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;body&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;type Props = {};&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;const $TM_FILENAME_BASE = ({}: Props) =&amp;gt; {&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;  return &amp;lt;&amp;gt;&amp;lt;/&amp;gt;;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;};&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;export default $TM_FILENAME_BASE;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Create TypeScript React arrow function component&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;You can use &lt;code&gt;trafc&lt;/code&gt; snippet for React TypeScript file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now I want to describe what the above code says:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;“React Arrow Function Component” is the snippet name. It is displayed via IntelliSense if no &lt;code&gt;description&lt;/code&gt; is provided.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;prefix&lt;/code&gt; is the snippet that we can use on the VSCode to display the &lt;code&gt;body&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;body&lt;/code&gt; is an array of strings consisting of the code we want to be displayed via the &lt;code&gt;prefix&lt;/code&gt; snippet. Every line of our codes should be placed in a string. If you need to use enter character type &lt;code&gt;\n&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;description&lt;/code&gt; as its name shows is the description of our snippet.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Another example is to create a ‍‍&lt;code&gt;console.log&lt;/code&gt; with a description like &lt;code&gt;console.log("status:", status)&lt;/code&gt;. The snippet configuration is shown in the below section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;console.log with description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;prefix&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;body&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;console.log('${1:desc}:', ${1:desc})&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Insert a console.log() with description as the           same as the variable.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The new thing is the &lt;code&gt;${1:desc}&lt;/code&gt;. The &lt;code&gt;1&lt;/code&gt; means after you insert the snippet, the cursor will be placed on that position.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;desc&lt;/code&gt; means these two parts should be the same in order to VSCode type them simultaneously. For more information &lt;a href="https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets" rel="noopener noreferrer"&gt;check this link&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>vscode</category>
      <category>snippet</category>
      <category>react</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
