<?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: Md. Fardin Khan</title>
    <description>The latest articles on DEV Community by Md. Fardin Khan (@kporus).</description>
    <link>https://dev.to/kporus</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%2F1175434%2Fc07de2dc-3555-4e4c-82d3-10f54f1dbffc.jpg</url>
      <title>DEV Community: Md. Fardin Khan</title>
      <link>https://dev.to/kporus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kporus"/>
    <language>en</language>
    <item>
      <title>🚀 Explore My New Interactive Portfolio and GitHub Projects! 🌟</title>
      <dc:creator>Md. Fardin Khan</dc:creator>
      <pubDate>Thu, 20 Jun 2024 15:25:38 +0000</pubDate>
      <link>https://dev.to/kporus/explore-my-new-interactive-portfolio-and-github-projects-74k</link>
      <guid>https://dev.to/kporus/explore-my-new-interactive-portfolio-and-github-projects-74k</guid>
      <description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;I'm excited to share the new version of my portfolio with you! I've been working hard to improve it using Kaboom.js and Tiled software. Here’s what you can find in my new portfolio:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Projects&lt;/strong&gt;: Created with Kaboom.js.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Detailed Maps&lt;/strong&gt;: Maps designed with Tiled software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill Showcase&lt;/strong&gt;: My technical and soft skills.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can view my new portfolio &lt;a href="https://idyllic-empanada-3f941d.netlify.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you’re curious, you can also check out the older version of my portfolio &lt;a href="https://singular-mooncake-bead22.netlify.app/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I also have many projects on GitHub that you might find interesting. Feel free to explore them &lt;a href="https://github.com/KPorus" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I’d love to hear your thoughts. Reach out if you have any questions or want to connect.&lt;/p&gt;

&lt;p&gt;Thanks for checking out my work!&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀&lt;/p&gt;

</description>
      <category>portfolio</category>
      <category>vite</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Client Device Detection in Next Js</title>
      <dc:creator>Md. Fardin Khan</dc:creator>
      <pubDate>Mon, 08 Apr 2024 10:52:03 +0000</pubDate>
      <link>https://dev.to/kporus/client-device-detection-in-next-js-4o9l</link>
      <guid>https://dev.to/kporus/client-device-detection-in-next-js-4o9l</guid>
      <description>&lt;p&gt;Ensuring optimal user experience across various devices is paramount in the ever-evolving web development landscape. Whether it's a smartphone, tablet, laptop, or desktop computer, each device has its own screen size, resolution, and capabilities. As web developers, one of our primary goals is to deliver content that renders seamlessly across this diverse array of devices. This is where device detection comes into play.&lt;/p&gt;

&lt;p&gt;Device detection involves identifying the type of device accessing a website, allowing developers to tailor the content and layout accordingly. By understanding the device's characteristics, such as screen size and browser capabilities, developers can optimize the presentation of their website for a superior user experience.&lt;/p&gt;

&lt;p&gt;In my recent endeavors to enhance website rendering within my Next.js projects, I delved into the realm of device detection. Despite numerous attempts using conventional methods, I found myself unable to achieve the desired results. After hours of research on Google and YouTube, I stumbled upon a game-changing solution: the &lt;a href="https://nextjs.org/docs/app/api-reference/functions/headers" rel="noopener noreferrer"&gt;Next.js Header API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Utilizing the Next.js Header API for device detection involved a series of strategic implementations. By examining user-agent strings and other relevant data, I could accurately discern the type of device accessing the website. Armed with this information, I could then tailor the website rendering to suit the specific device, whether it be a mobile phone, tablet, or desktop computer.&lt;/p&gt;

&lt;p&gt;Here's a simplified example of how this can be achieved:&lt;/p&gt;

&lt;p&gt;src/app/page.tsx&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { headers } from "next/headers";
import { isMobile } from "../utils/isMobile";

export default async function Home() {
  const userAgent = headers().get("user-agent") || "";
  const mobileCheck = isMobile(userAgent);

  return mobileCheck? (
      &amp;lt;div&amp;gt;Mobile Page&amp;lt;/div&amp;gt;
  ) : (
    &amp;lt;div&amp;gt;Desktop page&amp;lt;/div&amp;gt;
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;/utils/isMobile&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// utils/isMobile.ts
export const isMobile = (userAgent: string): boolean =&amp;gt; {
  return /android.+mobile|ip(hone|[oa]d)/i.test(userAgent);
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By incorporating the Next.js Header API and implementing device detection in this manner, I was able to overcome the challenges I faced and successfully optimize website rendering for different devices. This approach not only improves user experience but also demonstrates the power and versatility of Next.js in modern web development.&lt;/p&gt;

&lt;p&gt;Whether you're building a personal blog, an e-commerce platform, or a corporate website, considering device detection using Next.js Header API can significantly enhance your project's accessibility and appeal. Embrace this innovative solution and embark on a journey towards delivering exceptional user experiences across all devices.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>code</category>
      <category>programming</category>
    </item>
    <item>
      <title>Unveiling the Effects of Icons on Website Performance (part two)</title>
      <dc:creator>Md. Fardin Khan</dc:creator>
      <pubDate>Fri, 06 Oct 2023 13:24:36 +0000</pubDate>
      <link>https://dev.to/kporus/unveiling-the-effects-of-icons-on-website-performance-part-two-4h41</link>
      <guid>https://dev.to/kporus/unveiling-the-effects-of-icons-on-website-performance-part-two-4h41</guid>
      <description>&lt;p&gt;Hello and welcome back to the next part of our session. In the previous session, we delved into the impact of &lt;a href="https://react-icons.github.io/react-icons/" rel="noopener noreferrer"&gt;React Icons&lt;/a&gt; on web performance, and if you missed it, you can catch up by visiting &lt;a href="https://dev.to/kporus/unveiling-the-effects-of-icons-on-website-performance-53lm"&gt;Part One&lt;/a&gt;. Now, it's time to roll up our sleeves and explore some effective approaches to reduce page load times and enhance overall web performance.&lt;/p&gt;

&lt;p&gt;When it comes to web development, speed matters—a lot. It's not just about delivering content; it's about delivering it swiftly and efficiently. Slow-loading pages can be a major turn-off for users and can negatively affect your website's search engine rankings.&lt;/p&gt;

&lt;p&gt;So, without further ado, let's dive into the strategies and techniques I've discovered to optimize web performance and provide users with a smoother, faster experience.&lt;/p&gt;

&lt;p&gt;Before we proceed, please note that the approaches I'm about to share are based on my findings and experiences. I'm not endorsing any specific tool or method, and I'm open to learning from others. If you have a better solution or insight to offer, I encourage you to leave a comment or reach out to me via email. I'm eager to explore all available solutions and continue our collective journey toward improved web performance.&lt;/p&gt;

&lt;p&gt;Let's get started! 🚀&lt;/p&gt;

&lt;p&gt;At the outset, I opted for &lt;a href="https://ant.design/components/icon" rel="noopener noreferrer"&gt;ANT DESIGN ICONS&lt;/a&gt; when it came to using icons in my web development projects. Why, might you ask? Well, it's incredibly convenient and lightweight. Unlike some icon libraries that require you to install the entire component library, Ant Design Icons offers a more streamlined approach.&lt;/p&gt;

&lt;p&gt;With Ant Design Icons, you don't need to bloat your project with unnecessary components. Instead, you can selectively use just the icons you need. The installation process is a breeze. Just run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @ant-design/icons --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This minimalistic approach not only keeps your project lean but also helps optimize performance. After all, every byte matters when it comes to web performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdksnuzpdg43v53j96jcq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdksnuzpdg43v53j96jcq.png" alt="Code" width="386" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Certainly, it's important to note that it's not just the choice of icon library that matters for web performance, but also how you integrate and use those icons in your code.&lt;/p&gt;

&lt;p&gt;Efficient usage of icons can make a significant difference in loading times and resource utilization. It's not uncommon to see web developers inadvertently introduce performance bottlenecks by misusing or overloading their web pages with unnecessary icons. &lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;1. Using Ant Design Icons in the Navbar:&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;In my first approach, I made the strategic decision to integrate Ant Design Icons into the navigation bar of my website. Given that the navbar is a consistent element across all pages, this choice seemed natural and efficient.&lt;/p&gt;

&lt;p&gt;Icons in the navbar serve a dual purpose—they enhance both functionality and aesthetics. They offer users visual cues, which make navigation more intuitive and engaging. However, it's crucial to strike a balance and avoid overwhelming the navbar with icons that don't serve a genuine purpose.&lt;/p&gt;

&lt;p&gt;To achieve this, I followed a specific approach:&lt;/p&gt;

&lt;p&gt;*&lt;strong&gt;&lt;em&gt;Import Icons in a Separate File:&lt;/em&gt;&lt;/strong&gt;*&lt;/p&gt;

&lt;p&gt;I created a separate file for importing icons. This file &lt;br&gt;
 houses all the icons I intended to use throughout the &lt;br&gt;
 website. Importing them in one place ensures that they are &lt;br&gt;
 fetched and included only once during the build process &lt;br&gt;
 Here's a glimpse of the code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmglg4gqwui07hva0ngbh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmglg4gqwui07hva0ngbh.png" alt="Code" width="800" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;strong&gt;&lt;em&gt;Reusable Icons:&lt;/em&gt;&lt;/strong&gt;*&lt;/p&gt;

&lt;p&gt;By centralizing the icons in a single file, I made it possible to reuse these icons across multiple pages without the need to request them from Ant Design's server repeatedly. This approach significantly reduces page load times and optimizes the overall web performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4zd3fin01dg4qlu68g6v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4zd3fin01dg4qlu68g6v.png" alt="Code" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, this method ensures that icons are imported only once during the build process, sparing us from unnecessary server requests and benefiting the overall page load time.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;2. Use of SVG ICONS:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Many developers, including myself, have held the belief that using SVGs can negatively impact our web page's performance. However, over time, I've come to realize that it's not SVG themselves but rather how we use them that matters.&lt;/p&gt;

&lt;p&gt;In my code, I adopted an approach where I treated SVGs as images in Next.js. This strategy allowed me to efficiently deploy SVGs as part of my web project.&lt;/p&gt;

&lt;p&gt;Here's how I implemented it:&lt;/p&gt;

&lt;p&gt;*&lt;strong&gt;&lt;em&gt;Import SVGs as Images URL:&lt;/em&gt;&lt;/strong&gt;*&lt;br&gt;
I imported SVGs just like any other image file, as shown &lt;br&gt;
    below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sgumzoose5ej2l1i030.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4sgumzoose5ej2l1i030.png" alt="Code" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;strong&gt;&lt;em&gt;Use SVGs Where Needed:&lt;/em&gt;&lt;/strong&gt;*&lt;/p&gt;

&lt;p&gt;Once imported, I could use these SVGs as images in my &lt;br&gt;
   components or pages, as demonstrated in the following code &lt;br&gt;
   snippet:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55y0b5r1xw7xemk91b0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55y0b5r1xw7xemk91b0p.png" alt="Code" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This approach made it simple to incorporate SVG wherever I &lt;br&gt;
  needed them in my web application.&lt;/p&gt;

&lt;p&gt;*&lt;strong&gt;&lt;em&gt;Optimize SVG When Required:&lt;/em&gt;&lt;/strong&gt;*&lt;/p&gt;

&lt;p&gt;While using SVGs as images, I also ensured that the SVGs &lt;br&gt;
   themselves were optimized for web use. This involved &lt;br&gt;
   optimizing their file sizes and ensuring that they didn't &lt;br&gt;
   contain unnecessary elements or attributes. This &lt;br&gt;
   optimization step is crucial for maintaining a fast-loading &lt;br&gt;
   website.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F25sv664no2ceehjecw2y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F25sv664no2ceehjecw2y.png" alt="Code" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In closing, I want to reiterate that these findings are a result of my exploration and experiences. Web development is a dynamic field, and there's always more to learn. There may be alternative approaches, new tools, or optimizations that I haven't encountered yet. If you come across any errors or have better solutions, please don't hesitate to share them.&lt;/p&gt;

&lt;p&gt;The beauty of our developer community lies in our collective knowledge and our willingness to help one another grow. Let's continue to push the boundaries of web performance, learn from each other, and create even faster and more efficient websites.&lt;/p&gt;

&lt;p&gt;Thank you for being a part of this journey, and let's keep the spirit of curiosity and collaboration alive in our pursuit of better web performance.&lt;/p&gt;

&lt;p&gt;Happy coding, and may your websites always load swiftly! 🚀🚀&lt;/p&gt;

</description>
      <category>performance</category>
      <category>nextjs</category>
      <category>react</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Unveiling the Effects of Icons on Website Performance</title>
      <dc:creator>Md. Fardin Khan</dc:creator>
      <pubDate>Tue, 03 Oct 2023 03:22:10 +0000</pubDate>
      <link>https://dev.to/kporus/unveiling-the-effects-of-icons-on-website-performance-53lm</link>
      <guid>https://dev.to/kporus/unveiling-the-effects-of-icons-on-website-performance-53lm</guid>
      <description>&lt;p&gt;Hello, fellow developers!&lt;/p&gt;

&lt;p&gt;Welcome to my debut blog post. If you spot any errors, kindly point them out—I'm here to learn and grow. Today, I'm excited to delve into a recent challenge I encountered while grappling with website performance.&lt;/p&gt;

&lt;p&gt;First and foremost, let me clarify that I'm not here to cast blame or impose my views on anyone. I've embarked on this writing journey to share my experience, particularly a significant hiccup I faced while crafting my portfolio website. Allow me to introduce you to my homepage—&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5kop8uwyd704d9ekbxqf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5kop8uwyd704d9ekbxqf.jpg" alt="Home" width="800" height="460"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ahtzl8yez7lje1605s1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ahtzl8yez7lje1605s1.jpg" alt="Home" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can observe, the homepage consists of a few text elements and a navigation bar adorned with icons. To achieve this, I employed Material-UI (MUI) and &lt;a href="https://www.npmjs.com/package/react-icons" rel="noopener noreferrer"&gt;React Icons&lt;/a&gt;. However, there's a noticeable hiccup - the page, ideally, should load swiftly, but instead, it's a bit sluggish. Even more concerning, it's transferring more data than anticipated.&lt;/p&gt;

&lt;p&gt;Let's dive deeper into these issues. After Some time I found there are many unused javascript which is coming from React icons. please see this-- &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qoexa7zmg38e75eha6j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qoexa7zmg38e75eha6j.jpg" alt="Network Tab" width="800" height="423"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs6l4imsvhsc6r7loavrg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs6l4imsvhsc6r7loavrg.jpg" alt="Network Tab" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, as you can see, the network tab indicates an abundance of unused JavaScript that's being pulled in from React Icons. This is quite perplexing, especially when I've used only one icon on my homepage. It seems that the icons file is loading every icon in its arsenal, regardless of whether it's needed or not. Here is how I imported the icons--&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxazm1h3bajd57c7yhxgv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxazm1h3bajd57c7yhxgv.jpg" alt="Code" width="798" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Initially, I thought I had found a solution by dynamically importing the icons as needed. However, upon inspecting the React Icons file within the node modules, it became apparent where the issue lies. Take a look at this snippet: &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcabj2zn5moncfzjw61q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcabj2zn5moncfzjw61q.jpg" alt="Code" width="800" height="354"&gt;&lt;/a&gt;&lt;br&gt;
In this image, you can observe that all the "Gi" type icons are bundled together in one file. So, even if I use only one or a few icons from the "Gi" file, React Icons generates and loads the entire file, which includes all the icons it offers.&lt;/p&gt;

&lt;p&gt;This behavior undoubtedly contributes to the slower loading times and excessive data transfer that I observed.&lt;/p&gt;

&lt;p&gt;Now, let's take a look at the homepage I created without relying on React Icons:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhgak3l9i4rezbl0z580a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhgak3l9i4rezbl0z580a.jpg" alt="Home page" width="800" height="408"&gt;&lt;/a&gt;&lt;br&gt;
As you can see, the difference is striking. The page now loads significantly faster, and the data transfer is notably reduced compared to the previous setup.&lt;/p&gt;

&lt;p&gt;In my quest to enhance website performance, I decided to explore an alternative approach for displaying icons on my portfolio. By refraining from using React Icons and opting for a different method, I was able to achieve these promising results.&lt;/p&gt;

&lt;p&gt;Stay tuned for the exciting details!&lt;br&gt;
&lt;a href="https://dev.to/kporus/unveiling-the-effects-of-icons-on-website-performance-part-two-4h41"&gt;Unveiling the Effects of Icons on Website Performance (Part two)&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>performance</category>
      <category>react</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
