<?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: Mahabub Azam</title>
    <description>The latest articles on DEV Community by Mahabub Azam (@codermahabub).</description>
    <link>https://dev.to/codermahabub</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%2F777226%2F4066b0da-1a57-4ff5-b2ff-c5ae1c0dcc49.jpeg</url>
      <title>DEV Community: Mahabub Azam</title>
      <link>https://dev.to/codermahabub</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codermahabub"/>
    <language>en</language>
    <item>
      <title>How to Create Custom React TypeScript (.tsx) Code Snippets in Visual Studio Code</title>
      <dc:creator>Mahabub Azam</dc:creator>
      <pubDate>Thu, 22 Aug 2024 18:09:14 +0000</pubDate>
      <link>https://dev.to/codermahabub/how-to-create-custom-react-typescript-tsx-code-snippets-in-visual-studio-code-8p9</link>
      <guid>https://dev.to/codermahabub/how-to-create-custom-react-typescript-tsx-code-snippets-in-visual-studio-code-8p9</guid>
      <description>&lt;p&gt;VS Code is a wonderful tool when it comes to code editing you can just make your own custom code snippet and improve development productivity. If you write a lot of React components or anything else that is kind of boilerplate-ish and repetitive it makes sense to create custom snippets as well so your code stays nice, neat, concise i.e. DRY (Don't Repeat Yourself) across all projects. This blog will walk you through setting up a custom React TypeScript. tsx snippet in VS Code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 🚀: Find the User Snippet&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Visual Studio Code.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To access the user snippet, go to top menu &amp;gt; File&amp;gt; Preferences&amp;gt; User Snippets (or press Ctrl+Shift+P and type Snippets.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the Language that you want to create a snippet for. Choose TypeScript React ( for a snippet of react-typescript code. tsx).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 2 🚀: Create a New Snippet&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you click the language for which you want to define your new snippet, VS Code will open a JSON file were you should write down your custom snippets. Template to get you started&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6u2hz5pst57f11mnd60y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6u2hz5pst57f11mnd60y.png" alt="Create a New Snippet" width="800" height="694"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 🚀: Understand the Snippet Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;prefix: This is the word that triggers your snippet. If you type "rfc" as a code, this is what the snippet shows up in your suggestions.&lt;/p&gt;

&lt;p&gt;body - The code that will be embedded in document Using {} in this way you can define placeholders and tab stops where a user input should go.&lt;/p&gt;

&lt;p&gt;description – Used to write a brief description of what the snippet does so that it will be easier for one to identify in suggestions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4 🚀: Store &amp;amp; Resue Your Code Snippet&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Save the JSON file after creating this snippet. This way from now on, whenever you create a new. When you are working on a.tsx file in VS Code for example, if you type rfc, the snippet will expand into a complete React functional component skeleton.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnimgnm58j6na09g91gsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnimgnm58j6na09g91gsk.png" alt="Store &amp;amp; Resue Your Code Snippet" width="800" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Written by Chad, posted on 02-05–2019 Meta: VScode snippets can save you a metric f**k tonne of time when coding so that's an easy start point to look into. With such a guide in hand, you should be able to create React TypeScript snippets of your own that are tailored directly toward the way you work. Get going with writing your own snippets and how they change the way you write code!&lt;/p&gt;

</description>
      <category>code</category>
      <category>snippet</category>
      <category>codesnippet</category>
      <category>customtypescriptsnippet</category>
    </item>
    <item>
      <title>CSS Box Model &amp; Media Query Explained!</title>
      <dc:creator>Mahabub Azam</dc:creator>
      <pubDate>Sun, 19 Dec 2021 16:36:53 +0000</pubDate>
      <link>https://dev.to/codermahabub/css-box-model-media-query-explained-54ne</link>
      <guid>https://dev.to/codermahabub/css-box-model-media-query-explained-54ne</guid>
      <description>&lt;p&gt;&lt;strong&gt;&amp;gt; CSS Box Model:&lt;/strong&gt;&lt;br&gt;
When HTML elements are treated as a box, there are special benefits to web page design. This is a very convenient method to design the layout of any web page in particular. The CSS box model is the combined position of borders, margins, padding, and elements or content around HTML elements. Box model properties define border, margin, padding, or outline around any content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cXQlrcoy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kuj0cr59r28h4ybqsni0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cXQlrcoy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kuj0cr59r28h4ybqsni0.PNG" alt="Image description" width="409" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parts of CSS Box Model:&lt;/strong&gt;&lt;br&gt;
Margin - The margin is defined as the space around the border. No color can be used on the surface or background of the margin, it is completely transparent.&lt;br&gt;
Border - The border is located around the content padding, that is, between the margins and the padding. The color of the surface or background influences the border.&lt;br&gt;
Padding - The space around the content is determined using padding. No color can be used on the padding surface or background, it is completely transparent.&lt;br&gt;
Content Itself- Any content in the box model is text, images, etc., which are displayed on the web page.&lt;/p&gt;

&lt;p&gt;With CSS, when we define the width and height of an HTML element, we actually define the full width and height for only the content, such as - an image, a paragraph, etc. But in order to display any content beautifully on a web page, you must determine the padding, borders and margins.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&amp;gt; Explanation of CSS Media Query:&lt;/strong&gt;&lt;br&gt;
Media query is a method integrated with version 3.0 of CSS that makes it easy to make any web page responsive. Run or execute CSS style codes within the media query only if certain conditions are true.&lt;br&gt;
The @media property is used to access CSS media queries. The width of the HTML elements is usually defined for different devices and a certain number of CSS style codes are specified for all devices of that width. &lt;/p&gt;

&lt;p&gt;There is an example below, where CSS's @media property has been used. Normally the color of the surface or background is blue, but when the browser window is 600px or less, the color of the surface or background will be light blue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5b3iJtes--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4v4vurfg1o1fbdupca5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5b3iJtes--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4v4vurfg1o1fbdupca5.PNG" alt="Image description" width="484" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A web page should be designed for a mobile or smartphone device before it is designed to be responsive to the desktop screen, so that the web page loads or appears faster on smaller screens like mobile.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
