<?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: Omid Nikrah</title>
    <description>The latest articles on DEV Community by Omid Nikrah (@omidnikrah).</description>
    <link>https://dev.to/omidnikrah</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%2F173574%2Fbeefbc2a-f55c-42dc-8b76-326ec9aab51a.jpg</url>
      <title>DEV Community: Omid Nikrah</title>
      <link>https://dev.to/omidnikrah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omidnikrah"/>
    <language>en</language>
    <item>
      <title>🚀 Introducing Figma Sprite Generator – Effortlessly Create PNG Sprites from Your Figma Icons</title>
      <dc:creator>Omid Nikrah</dc:creator>
      <pubDate>Mon, 14 Oct 2024 10:26:39 +0000</pubDate>
      <link>https://dev.to/omidnikrah/introducing-figma-sprite-generator-effortlessly-create-png-sprites-from-your-figma-icons-1c2l</link>
      <guid>https://dev.to/omidnikrah/introducing-figma-sprite-generator-effortlessly-create-png-sprites-from-your-figma-icons-1c2l</guid>
      <description>&lt;p&gt;Hey DEV community! 👋&lt;/p&gt;

&lt;p&gt;I just released a Figma plugin called &lt;a href="https://github.com/omidnikrah/figma-sprite-generator" rel="noopener noreferrer"&gt;Figma Sprite Generator&lt;/a&gt;, and I’d love to get your feedback! The tool is designed to help designers quickly generate PNG sprites from selected icons within Figma.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎯 Key Features:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Easy-to-use interface:&lt;/strong&gt; Select your icons and export them as a single PNG sprite with just a few clicks.&lt;br&gt;
&lt;strong&gt;Customizable ratios:&lt;/strong&gt; Resize icons to your desired scale with a simple ratio selection (e.g., 1.5x or 2x).&lt;br&gt;
&lt;strong&gt;Automatic sprite.json generation:&lt;/strong&gt; Along with the sprite image, you’ll get a JSON file with all the icons' coordinates and dimensions for easy integration in your projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎨 Why I Built This:&lt;/strong&gt;&lt;br&gt;
As a software engineer, I’ve worked closely with many designers who often struggle with creating spritesheet icons. It’s a frustrating process for them—exporting all the icons from Figma, uploading them to a platform to generate the spritesheet, and then going through additional steps to get the final result. This manual approach is time-consuming and inefficient. Figma Sprite Generator automates the entire process, instantly creating sprites and generating metadata, simplifying the workflow for both designers and developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🛠️ How It Works:&lt;/strong&gt;&lt;br&gt;
Select the icons you want in Figma.&lt;br&gt;
Choose the desired ratio for resizing.&lt;br&gt;
Generate a PNG sprite and JSON metadata with the positions and sizes of each icon.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🌟 Check it out:&lt;/strong&gt;&lt;br&gt;
You can find the project on GitHub: &lt;a href="https://github.com/omidnikrah/figma-sprite-generator" rel="noopener noreferrer"&gt;Figma Sprite Generator&lt;/a&gt;. Feel free to contribute, open issues, or suggest improvements!&lt;/p&gt;

&lt;p&gt;Let me know what you think in the comments! 🚀&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>figma</category>
      <category>typescript</category>
      <category>react</category>
    </item>
    <item>
      <title>📊 Show your StackOverflow profile status on your readmes!</title>
      <dc:creator>Omid Nikrah</dc:creator>
      <pubDate>Thu, 30 Jul 2020 08:58:46 +0000</pubDate>
      <link>https://dev.to/omidnikrah/show-your-stackoverflow-profile-status-on-your-readmes-4eh3</link>
      <guid>https://dev.to/omidnikrah/show-your-stackoverflow-profile-status-on-your-readmes-4eh3</guid>
      <description>&lt;p&gt;Recently, I have made an API to &lt;a href="https://github.com/omidnikrah/github-readme-medium" rel="noopener noreferrer"&gt;show your latest Medium articles in GitHub Readmes&lt;/a&gt;, Now you can &lt;a href="https://github.com/omidnikrah/github-readme-stackoverflow" rel="noopener noreferrer"&gt;show your StackOverflow profile status&lt;/a&gt; on your readmes by using my new project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;p&gt;Copy paste following markdown into your markdown content, and that's it. Easy Easy Tammam Tammam!&lt;/p&gt;

&lt;p&gt;Change the &lt;code&gt;?userID=&lt;/code&gt; value to your StackOverflow's username.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![Omid Nikrah StackOverflow&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://github-readme-stackoverflow.vercel.app/?userID=6558042&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://stackoverflow.com/users/6558042/omid-nikrah)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://stackoverflow.com/users/6558042/omid-nikrah" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub-readme-stackoverflow.vercel.app%2F%3FuserID%3D6558042" alt="Omid Nikrah StackOverflow"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Show your latest Medium article in GitHub Readme</title>
      <dc:creator>Omid Nikrah</dc:creator>
      <pubDate>Fri, 24 Jul 2020 09:53:54 +0000</pubDate>
      <link>https://dev.to/omidnikrah/show-your-latest-medium-article-in-github-readme-3cja</link>
      <guid>https://dev.to/omidnikrah/show-your-latest-medium-article-in-github-readme-3cja</guid>
      <description>&lt;p&gt;3 weeks ago, GitHub adds a feature that enables you to make your profile more usable and beautiful using a README file.&lt;/p&gt;

&lt;p&gt;By using &lt;a href="https://github.com/omidnikrah/github-readme-medium" rel="noopener noreferrer"&gt;GitHub Readme Medium&lt;/a&gt;, you can show your latest medium article in your READMEs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;p&gt;Copy-paste this into your markdown content, and that's it. Easy Easy Tammam Tammam!&lt;/p&gt;

&lt;p&gt;Change the &lt;code&gt;?username=&lt;/code&gt; value to your Medium's username.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![Omid Nikrah Medium&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://github-readme-medium.herokuapp.com/?username=omidnikrah&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://medium.com/@omidnikrah)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://medium.com/@omidnikrah" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2548f1c77cd79b3a1c809d6bd213fbdce6e8e72f/68747470733a2f2f6769746875622d726561646d652d6d656469756d2e6865726f6b756170702e636f6d2f3f757365726e616d653d6f6d69646e696b726168" alt="Omid Nikrah Medium" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>github</category>
      <category>opensource</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Autofill OTP code in iOS</title>
      <dc:creator>Omid Nikrah</dc:creator>
      <pubDate>Sun, 19 Jul 2020 10:22:31 +0000</pubDate>
      <link>https://dev.to/omidnikrah/autofill-otp-code-in-ios-53m</link>
      <guid>https://dev.to/omidnikrah/autofill-otp-code-in-ios-53m</guid>
      <description>&lt;p&gt;HTML elements have many attributes that we don’t use them and maybe we don’t know all of them at all :). One of the useful attributes in form inputs is &lt;code&gt;auto-complete="one-time-code”&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In most websites, Users can log in using the OTP code. When you receive the OTP code, it’s so boring to leave the browser and go to the messages and see the OTP code.&lt;/p&gt;

&lt;p&gt;Now, I want to tell you a way to show the OTP code in the iOS keyboard like the following.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to implement this feature?
&lt;/h2&gt;

&lt;p&gt;First of all, you should set &lt;code&gt;auto-complete=”one-time-code”&lt;/code&gt; on your input like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"tel"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"otp-code"&lt;/span&gt; &lt;span class="na"&gt;auto-complete=&lt;/span&gt;&lt;span class="s"&gt;"one-time-code"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, it’s time to update your SMS message. You should have &lt;code&gt;"code”&lt;/code&gt; word in your SMS message.&lt;/p&gt;

&lt;p&gt;For example: &lt;code&gt;Code: 123456 is your verification code&lt;/code&gt;&lt;/p&gt;

</description>
      <category>ios</category>
      <category>javascript</category>
      <category>react</category>
      <category>html</category>
    </item>
    <item>
      <title>Stop using Redux, cache requests</title>
      <dc:creator>Omid Nikrah</dc:creator>
      <pubDate>Fri, 17 Jul 2020 21:37:47 +0000</pubDate>
      <link>https://dev.to/omidnikrah/stop-using-redux-cache-requests-2fpf</link>
      <guid>https://dev.to/omidnikrah/stop-using-redux-cache-requests-2fpf</guid>
      <description>&lt;p&gt;In this article, I don’t want to talk about the new state management library or compare Redux with Context API. I just want to say, in some situations, you don’t need to Redux and you can handle it by other solutions.&lt;/p&gt;

&lt;p&gt;Imagine we have a PWA and it’s an online shop. Usually, we navigate between products and check them. When you like a product, you may check it many times and it has a bad experience if every time you should wait for getting product data from the server. We have two solutions to have a better experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  One. Using Redux (Not recommended)
&lt;/h3&gt;

&lt;p&gt;We can use Redux and have a state to push the product data in this state. But when you have developed a large scale application, It’s not a good solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two. Cache Requests (Recommended)
&lt;/h3&gt;

&lt;p&gt;CACHE REQUESTS. Why using Redux until you can cache requests?&lt;/p&gt;

&lt;p&gt;We can have cache storage to store the requests data and when an API request called, first we looking for the response in the cache storage, and if we don’t have it, now we need to call the API request.&lt;/p&gt;

&lt;p&gt;We have many ways to implement this feature and I will show you some of them.&lt;/p&gt;

&lt;p&gt;You can implement it as the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class CacheRequests {
  constructor() {
    this.caches = new Map();
  }

  set(url, response) {
    this.caches.set(url, response);
  }

  get(url) {
    return this.caches.get(url);
  }

  has(url) {
    return this.caches.has(url);
  }
}

const cache = new CacheRequests();

const Request = (url, options) =&amp;gt; {
  if (cache.has(url)) {
    return cache.get(url);
  }
  fetch(url, options).then((response) =&amp;gt; {
    console.log(response);
    cache.set(url, response);
  });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or if you are using &lt;a href="https://www.npmjs.com/package/axios" rel="noopener noreferrer"&gt;axios&lt;/a&gt;, you can also use &lt;a href="https://www.npmjs.com/package/axios-extensions" rel="noopener noreferrer"&gt;axios-extensions&lt;/a&gt; or &lt;a href="https://www.npmjs.com/package/axios-cache-adapter" rel="noopener noreferrer"&gt;axios-cache-adaptor&lt;/a&gt; packages.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>redux</category>
    </item>
  </channel>
</rss>
