<?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: Shyamalendu Nayak</title>
    <description>The latest articles on DEV Community by Shyamalendu Nayak (@shyam0118).</description>
    <link>https://dev.to/shyam0118</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%2F1859813%2F5cf372cf-8280-419f-a3fd-23b106da60fa.jpg</url>
      <title>DEV Community: Shyamalendu Nayak</title>
      <link>https://dev.to/shyam0118</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shyam0118"/>
    <language>en</language>
    <item>
      <title>App Router vs Pages Router in Next.js — a deep, practical guide</title>
      <dc:creator>Shyamalendu Nayak</dc:creator>
      <pubDate>Sat, 09 Aug 2025 11:16:37 +0000</pubDate>
      <link>https://dev.to/shyam0118/app-router-vs-pages-router-in-nextjs-a-deep-practical-guide-341g</link>
      <guid>https://dev.to/shyam0118/app-router-vs-pages-router-in-nextjs-a-deep-practical-guide-341g</guid>
      <description>&lt;p&gt;Next.js has revolutionized React development with its powerful routing systems. Over the years, it has evolved from the traditional Pages Router to the modern App Router, each offering unique advantages for different use cases. In this comprehensive guide, we'll explore both routing systems, their differences, and help you decide which one to use for your next project.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Page Router (Legacy)
&lt;/h3&gt;

&lt;p&gt;The Page Router was Next.js's original routing system, introduced from the beginning and still widely used today. It's stable, well-documented, and has been battle-tested in countless production applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Page Router Works&lt;/strong&gt;&lt;br&gt;
In the Page Router system, every file in the &lt;code&gt;pages&lt;/code&gt; directory automatically becomes a route:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pages/
├── index.js          // Route: /
├── about.js          // Route: /about
├── blog/
│   ├── index.js      // Route: /blog
│   └── [slug].js     // Route: /blog/[slug]
└── api/
    └── users.js      // API Route: /api/users
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Features of Page Router
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. File-Based Routing&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// pages/index.js
export default function Home() {
  return &amp;lt;h1&amp;gt;Welcome to the homepage!&amp;lt;/h1&amp;gt;
}

// pages/about.js
export default function About() {
  return &amp;lt;h1&amp;gt;About Us&amp;lt;/h1&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Dynamic Routes&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// pages/blog/[slug].js
import { useRouter } from 'next/router'

export default function BlogPost() {
  const router = useRouter()
  const { slug } = router.query

  return &amp;lt;h1&amp;gt;Blog Post: {slug}&amp;lt;/h1&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. API Routes&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// pages/api/users.js
export default function handler(req, res) {
  if (req.method === 'GET') {
    res.status(200).json({ users: ['John', 'Jane'] })
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Data Fetching Methods&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Static Generation
export async function getStaticProps() {
  const data = await fetchData()
  return { props: { data } }
}

// Server-Side Rendering
export async function getServerSideProps() {
  const data = await fetchData()
  return { props: { data } }
}

// Static Generation with Dynamic Routes
export async function getStaticPaths() {
  return {
    paths: [{ params: { slug: 'post-1' } }],
    fallback: false
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Advantages of Page Router&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mature and Stable:&lt;/strong&gt; Years of development and community usage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simple Mental Model:&lt;/strong&gt; Easy to understand file-to-route mapping&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensive Documentation:&lt;/strong&gt; Comprehensive guides and tutorials available&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wide Community Support:&lt;/strong&gt; Large ecosystem of tutorials and solutions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proven in Production:&lt;/strong&gt; Used by countless large-scale applications&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The App Router (Modern)
&lt;/h3&gt;

&lt;p&gt;Introduced in Next.js 13, the App Router represents a significant evolution in Next.js routing. Built on React Server Components, it offers more flexibility, better performance, and modern React patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How App Router Works&lt;/strong&gt;&lt;br&gt;
The App Router uses an &lt;code&gt;app&lt;/code&gt; directory where folders define routes, and special files define UI components:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app/
├── layout.js         // Root layout
├── page.js          // Route: /
├── about/
│   └── page.js      // Route: /about
├── blog/
│   ├── layout.js    // Blog layout
│   ├── page.js      // Route: /blog
│   └── [slug]/
│       └── page.js  // Route: /blog/[slug]
└── api/
    └── users/
        └── route.js // API Route: /api/users
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Features of App Router
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Server Components by Default&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// app/page.js (Server Component)
async function getData() {
  const res = await fetch('https://api.example.com/data')
  return res.json()
}

export default async function HomePage() {
  const data = await getData()

  return &amp;lt;h1&amp;gt;Welcome! {data.message}&amp;lt;/h1&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Layouts and Templates&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// app/layout.js (Root Layout)
export default function RootLayout({ children }) {
  return (
    &amp;lt;html lang="en"&amp;gt;
      &amp;lt;body&amp;gt;
        &amp;lt;nav&amp;gt;Navigation&amp;lt;/nav&amp;gt;
        {children}
        &amp;lt;footer&amp;gt;Footer&amp;lt;/footer&amp;gt;
      &amp;lt;/body&amp;gt;
    &amp;lt;/html&amp;gt;
  )
}

// app/blog/layout.js (Nested Layout)
export default function BlogLayout({ children }) {
  return (
    &amp;lt;div className="blog-layout"&amp;gt;
      &amp;lt;aside&amp;gt;Blog Sidebar&amp;lt;/aside&amp;gt;
      &amp;lt;main&amp;gt;{children}&amp;lt;/main&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Route Groups and Organization&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app/
├── (marketing)/
│   ├── about/
│   │   └── page.js    // Route: /about
│   └── contact/
│       └── page.js    // Route: /contact
└── (shop)/
    ├── products/
    │   └── page.js      // Route: /products
    └── cart/
        └── page.js      // Route: /cart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Loading and Error UI&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// app/blog/loading.js
export default function Loading() {
  return &amp;lt;div&amp;gt;Loading blog posts...&amp;lt;/div&amp;gt;
}

// app/blog/error.js
'use client'
export default function Error({ error, reset }) {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h2&amp;gt;Something went wrong!&amp;lt;/h2&amp;gt;
      &amp;lt;button onClick={() =&amp;gt; reset()}&amp;gt;Try again&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Streaming and Suspense&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// app/dashboard/page.js
import { Suspense } from 'react'

async function UserData() {
  const data = await fetchUserData() // This can stream
  return &amp;lt;div&amp;gt;{data.name}&amp;lt;/div&amp;gt;
}

export default function Dashboard() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;Dashboard&amp;lt;/h1&amp;gt;
      &amp;lt;Suspense fallback={&amp;lt;div&amp;gt;Loading user...&amp;lt;/div&amp;gt;}&amp;gt;
        &amp;lt;UserData /&amp;gt;
      &amp;lt;/Suspense&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Advantages of App Router&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React Server Components:&lt;/strong&gt; Better performance and smaller bundle sizes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming:&lt;/strong&gt; Progressive page rendering for better user experience&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible Layouts:&lt;/strong&gt; Nested layouts that persist across route changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in Loading States:&lt;/strong&gt; Automatic loading and error boundaries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better SEO:&lt;/strong&gt; Improved server-side rendering capabilities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern React Patterns:&lt;/strong&gt; Leverages the latest React features&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Differences Comparison&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Features&lt;/th&gt;
&lt;th&gt;Page Router&lt;/th&gt;
&lt;th&gt;App Router&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Directory&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pages/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;app&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Routing Method&lt;/td&gt;
&lt;td&gt;File-based&lt;/td&gt;
&lt;td&gt;Folder based&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Components&lt;/td&gt;
&lt;td&gt;Client by default&lt;/td&gt;
&lt;td&gt;Server by default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Date fetching&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;getServerSideProps&lt;/code&gt;, &lt;code&gt;getStaticProps&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;fetch() in components&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Layouts&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;_app&lt;/code&gt;,&lt;code&gt;_document.js&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;layout.js&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Loading state&lt;/td&gt;
&lt;td&gt;Custom implementation&lt;/td&gt;
&lt;td&gt;Built-in &lt;code&gt;loading.js&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bundle Size&lt;/td&gt;
&lt;td&gt;Larger client bundles&lt;/td&gt;
&lt;td&gt;Smaller client bundles&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Both Page Router and App Router have their place in the Next.js ecosystem. The Page Router remains a solid choice for many applications, offering stability and simplicity. The App Router, while more complex, provides powerful features that can significantly improve performance and developer experience.&lt;/p&gt;

&lt;p&gt;Feel free to checkout my &lt;a href="https://github.com/shyam0118" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>React Lazy Loading: Boosting Performance with Code Splitting</title>
      <dc:creator>Shyamalendu Nayak</dc:creator>
      <pubDate>Sun, 23 Feb 2025 06:02:20 +0000</pubDate>
      <link>https://dev.to/shyam0118/react-lazy-loading-boosting-performance-with-code-splitting-45lg</link>
      <guid>https://dev.to/shyam0118/react-lazy-loading-boosting-performance-with-code-splitting-45lg</guid>
      <description>&lt;p&gt;As React applications grow, large JavaScript bundles can slow down initial page loads, leading to poor user experience. Lazy loading is a technique that helps mitigate this issue by loading components only when needed, improving performance and reducing unnecessary resource consumption.&lt;/p&gt;

&lt;p&gt;In this blog, we'll explore React's built-in lazy loading capabilities and how to implement them effectively using &lt;code&gt;React.lazy&lt;/code&gt; and &lt;code&gt;Suspense&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Lazy Loading?&lt;/strong&gt;&lt;br&gt;
Lazy loading is a design pattern that defers the loading of non-essential resources until they are required. In React, this means loading components only when they are needed, instead of including them in the initial JavaScript bundle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefits of Lazy Loading&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faster Initial Load&lt;/strong&gt;: Only essential components are loaded upfront.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced Bundle Size&lt;/strong&gt;: Splitting code into smaller chunks makes the app more efficient.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimized Performance&lt;/strong&gt;: Improves time-to-interactive, enhancing user experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Implementing Lazy Loading in React&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using &lt;code&gt;React.lazy()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;React provides the React.lazy function to dynamically import components. It returns a Promise-based component that loads only when needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { Suspense } from "react";

const lazyComponent = React.lazy(() =&amp;gt; import("./LazyComponent"));

function App() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;React Lazy Loading Example&amp;lt;/h1&amp;gt;
      &amp;lt;Suspense fallback={&amp;lt;div&amp;gt;Loading...&amp;lt;/div&amp;gt;}&amp;gt;
        &amp;lt;LazyComponent /&amp;gt;
      &amp;lt;/Suspense&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;React.lazy(() =&amp;gt; import("./LazyComponent"))&lt;/code&gt;: Dynamically imports the component.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Suspense&lt;/code&gt;: Provides a fallback UI (e.g., &lt;strong&gt;Loading...&lt;/strong&gt;) until the lazy component is fully loaded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best Practices for Lazy Loading&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;Suspense&lt;/code&gt; for a Better UX&lt;/strong&gt;: Provide a meaningful fallback UI (e.g., a spinner or skeleton loader).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Group Related Components&lt;/strong&gt;: Avoid excessive splitting by grouping related components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Preload Critical Components&lt;/strong&gt;: Use dynamic imports to preload components that might be required soon.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Combine with Code Splitting&lt;/strong&gt;: Use Webpack's code-splitting and tools like Loadable Components for advanced performance optimization.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Lazy loading in React is a powerful feature that significantly enhances performance by reducing initial load time and optimizing resource usage. By leveraging &lt;code&gt;React.lazy&lt;/code&gt; and &lt;code&gt;Suspense&lt;/code&gt;, developers can efficiently manage their application's bundle size while maintaining a smooth user experience.&lt;/p&gt;

&lt;p&gt;Start implementing lazy loading in your React projects today and experience a noticeable improvement in performance!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Shyamalendu Nayak</dc:creator>
      <pubDate>Fri, 07 Feb 2025 06:05:30 +0000</pubDate>
      <link>https://dev.to/shyam0118/-5gg3</link>
      <guid>https://dev.to/shyam0118/-5gg3</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/shyam0118" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F1859813%2F5cf372cf-8280-419f-a3fd-23b106da60fa.jpg" alt="shyam0118"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/shyam0118/building-a-simple-chrome-extension-with-nextjs-3coc" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Building a Simple Chrome Extension with Next.js&lt;/h2&gt;
      &lt;h3&gt;Shyamalendu Nayak ・ Sep 8 '24&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#extensions&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#nextjs&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>extensions</category>
      <category>nextjs</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🚀 Docker Commands You Must Know! 🐳</title>
      <dc:creator>Shyamalendu Nayak</dc:creator>
      <pubDate>Thu, 06 Feb 2025 17:27:17 +0000</pubDate>
      <link>https://dev.to/shyam0118/docker-commands-you-must-know-17cn</link>
      <guid>https://dev.to/shyam0118/docker-commands-you-must-know-17cn</guid>
      <description>&lt;p&gt;Docker simplifies application deployment, making it easier to build, ship, and run applications anywhere. Whether you're a beginner or a seasoned developer, here are the key Docker commands you should have at your fingertips!&lt;/p&gt;

&lt;p&gt;🚀 &lt;strong&gt;Why Do We Need Docker?&lt;/strong&gt; 🐳&lt;/p&gt;

&lt;p&gt;"It works on my machine" Problem 🛑&lt;br&gt;
Developers often face issues where an application works on one system but fails on another due to different environments, dependencies, or OS configurations. Docker solves this by containerizing applications, ensuring consistency across different machines.&lt;/p&gt;

&lt;p&gt;🔹&lt;strong&gt;Docker Basics&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker version        # Check Docker version  
docker info           # Get system-wide information  
docker help           # Get help on Docker commands  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹&lt;strong&gt;Managing Containers&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker ps                      # List running containers  
docker ps -a                   # List all containers (including stopped ones)  
docker run &amp;lt;image&amp;gt;             # Run a container from an image  
docker start &amp;lt;container_id&amp;gt;    # Start a stopped container  
docker stop &amp;lt;container_id&amp;gt;     # Stop a running container  
docker restart &amp;lt;container_id&amp;gt;  # Restart a container  
docker rm &amp;lt;container_id&amp;gt;       # Remove a container  
docker logs &amp;lt;container_id&amp;gt;     # View container logs  

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

&lt;/div&gt;



&lt;p&gt;🔹&lt;strong&gt;Working with Images&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker images             # List all images  
docker pull &amp;lt;image&amp;gt;       # Download an image from Docker Hub  
docker build -t &amp;lt;name&amp;gt; .  # Build an image from a Dockerfile  
docker rmi &amp;lt;image_id&amp;gt;     # Remove an image  

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

&lt;/div&gt;



&lt;p&gt;🔹&lt;strong&gt;Executing Commands in Containers&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -it &amp;lt;container_id&amp;gt; bash       # Access a running container  
docker inspect &amp;lt;container_id&amp;gt;             # Get detailed container info  
docker cp &amp;lt;container_id&amp;gt;:/path/to/file .  # Copy file from container  

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

&lt;/div&gt;



&lt;p&gt;🔹&lt;strong&gt;Volumes &amp;amp; Storage&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker volume create &amp;lt;volume_name&amp;gt;  # Create a volume  
docker volume ls                    # List volumes  
docker volume rm &amp;lt;volume_name&amp;gt;      # Remove a volume  
docker run -v &amp;lt;volume_name&amp;gt;:/app &amp;lt;image&amp;gt; # Mount a volume to a container  

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

&lt;/div&gt;



&lt;p&gt;🔹&lt;strong&gt;Networking in Docker&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker network ls                      # List networks  
docker network create &amp;lt;network_name&amp;gt;   # Create a custom network  
docker network connect &amp;lt;network_name&amp;gt; &amp;lt;container_id&amp;gt; # Connect a container to a network  
docker network inspect &amp;lt;network_name&amp;gt;  # Get details of a network  

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

&lt;/div&gt;



&lt;p&gt;🔹&lt;strong&gt;Docker Compose&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose up -d  # Start services in the background  
docker compose down   # Stop and remove containers  
docker compose ps     # List services  
docker compose logs   # View logs of all services  

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

&lt;/div&gt;



&lt;p&gt;🔹&lt;strong&gt;Clean Up Docker Resources&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker system prune -a          # Remove unused data, containers, and images  
docker volume prune             # Remove unused volumes  
docker network prune            # Remove unused networks  
docker rmi $(docker images -q)  # Remove all images  
docker rm $(docker ps -aq)      # Remove all containers  

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

&lt;/div&gt;



&lt;p&gt;🔥 Mastering these commands will make your Docker experience much smoother! Which one do you use the most? Let me know in the comments! 👇&lt;/p&gt;

</description>
      <category>docker</category>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Local Storage vs Session Storage</title>
      <dc:creator>Shyamalendu Nayak</dc:creator>
      <pubDate>Mon, 21 Oct 2024 01:30:24 +0000</pubDate>
      <link>https://dev.to/shyam0118/local-storage-vs-session-storage-2m4g</link>
      <guid>https://dev.to/shyam0118/local-storage-vs-session-storage-2m4g</guid>
      <description>&lt;p&gt;When building modern web applications, managing client-side data efficiently is crucial for enhancing user experience. Two popular methods for storing data on the client side are &lt;strong&gt;Local Storage and Session Storage&lt;/strong&gt;, both part of the &lt;strong&gt;Web Storage API&lt;/strong&gt;. While they may appear similar in purpose, they have distinct features and use cases. In this blog post, we’ll explore the differences, benefits, and best practices for using Local Storage and Session Storage in your projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction to Web Storage API&lt;/strong&gt;&lt;br&gt;
The &lt;strong&gt;Web Storage API&lt;/strong&gt; allows web applications to store &lt;strong&gt;key-value&lt;/strong&gt; pairs in a user's browser. It offers two main mechanisms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Storage&lt;/strong&gt;: Stores data with no expiration time, meaning the data persists even after the browser is closed and reopened.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session Storage&lt;/strong&gt;: Stores data only for the duration of the session, which is erased when the browser is closed or the tab is closed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Differences Between Local Storage and Session Storage&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Local Storage&lt;/th&gt;
&lt;th&gt;Session Storage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Persistence&lt;/td&gt;
&lt;td&gt;Data persists indefinitely (until explicitly deleted).&lt;/td&gt;
&lt;td&gt;Data persists only for the duration of the browser session (until the tab or window is closed).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage Capacity&lt;/td&gt;
&lt;td&gt;Approximately 5-10 MB, depending on the browser.&lt;/td&gt;
&lt;td&gt;Roughly 5 MB, similar to Local Storage but may be lower depending on the browser.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scope&lt;/td&gt;
&lt;td&gt;Shared across all tabs and windows of the same origin (domain).&lt;/td&gt;
&lt;td&gt;Scoped to the tab or window where it was created. Not shared between tabs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use Cases&lt;/td&gt;
&lt;td&gt;Storing user preferences, theme settings, authentication tokens, etc.&lt;/td&gt;
&lt;td&gt;Temporary data such as form data or per-session state (e.g., filters).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Access Method&lt;/td&gt;
&lt;td&gt;Accessed via &lt;code&gt;localStorage&lt;/code&gt; object in JavaScript.&lt;/td&gt;
&lt;td&gt;Accessed via &lt;code&gt;sessionStorage&lt;/code&gt; object in JavaScript.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;By using these storage methods wisely, you can improve your app’s performance, provide a better user experience, and optimize client-side state management.&lt;/p&gt;

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

</description>
      <category>coding</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Understanding chunk.js in Modern Web Development: A Guide to Code Splitting and Performance Optimization</title>
      <dc:creator>Shyamalendu Nayak</dc:creator>
      <pubDate>Mon, 16 Sep 2024 17:53:17 +0000</pubDate>
      <link>https://dev.to/shyam0118/understanding-chunkjs-in-modern-web-development-a-guide-to-code-splitting-and-performance-optimization-95j</link>
      <guid>https://dev.to/shyam0118/understanding-chunkjs-in-modern-web-development-a-guide-to-code-splitting-and-performance-optimization-95j</guid>
      <description>&lt;p&gt;In web development, particularly with modern JavaScript frameworks like &lt;code&gt;React&lt;/code&gt;, &lt;code&gt;Vue&lt;/code&gt;, or &lt;code&gt;Angular&lt;/code&gt;, &lt;code&gt;chunk.js&lt;/code&gt; refers to a JavaScript bundle file that is created during the build process of an application.&lt;/p&gt;

&lt;p&gt;When bundling or compiling a web application, build tools like &lt;code&gt;Webpack&lt;/code&gt; or &lt;code&gt;Vite&lt;/code&gt; split the JavaScript code into smaller files called "chunks." These chunks are typically created for performance optimization and lazy loading. This approach is known as &lt;strong&gt;code-splitting&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here’s a breakdown of what &lt;code&gt;chunk.js&lt;/code&gt; files are&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Code Splitting&lt;/strong&gt;: Instead of loading the entire JavaScript application in one large file, the code is split into smaller chunks that are loaded only when they are needed. For example, a certain feature or page might only load when the user navigates to it, rather than at the initial page load.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Imports&lt;/strong&gt;: Frameworks use dynamic imports (e.g., import() in JavaScript) to load these chunks as the user interacts with different parts of the app. This reduces the initial load time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caching&lt;/strong&gt;: These chunk files often come with unique names (e.g., chunk.[hash].js), so browsers can cache them for future use, improving page load speed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;: By splitting the application into smaller pieces, the browser doesn’t have to load everything at once, resulting in faster load times, especially for larger apps.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Understanding Git's -m and -am Options: Simplifying Your Commit Workflow</title>
      <dc:creator>Shyamalendu Nayak</dc:creator>
      <pubDate>Wed, 11 Sep 2024 02:21:49 +0000</pubDate>
      <link>https://dev.to/shyam0118/understanding-gits-m-and-am-options-simplifying-your-commit-workflow-2413</link>
      <guid>https://dev.to/shyam0118/understanding-gits-m-and-am-options-simplifying-your-commit-workflow-2413</guid>
      <description>&lt;p&gt;Git is a powerful version control tool used by developers worldwide, but getting the hang of its many commands and flags can sometimes feel overwhelming. Two such flags, &lt;code&gt;-m&lt;/code&gt; and &lt;code&gt;-am&lt;/code&gt;, are particularly useful for streamlining your workflow when committing changes. In this blog post, we'll break down what these options mean, how they work, and when to use them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Git?&lt;/strong&gt;&lt;br&gt;
Before we dive into the specifics of &lt;code&gt;-m&lt;/code&gt; and &lt;code&gt;-am&lt;/code&gt;, let's quickly revisit what Git does. Git is a distributed version control system that tracks changes in your code. It enables developers to manage and collaborate on code projects efficiently by creating snapshots, or commits, of changes over time. Each commit is like a save point, allowing you to revert back to previous versions if needed.&lt;/p&gt;

&lt;p&gt;Making a commit in Git involves three basic steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Making changes&lt;/strong&gt; to your files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Staging&lt;/strong&gt; those changes (i.e., marking them as ready to be committed).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Committing&lt;/strong&gt; the changes, often with a descriptive message.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Git’s &lt;code&gt;-m&lt;/code&gt; Option: Commit with a Message&lt;/strong&gt;&lt;br&gt;
One of the most common actions you'll perform in Git is making a commit. Normally, Git opens an editor to let you write a detailed commit message, but when you want to save time or don't need a long message, you can use the &lt;code&gt;-m&lt;/code&gt; option.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-m&lt;/code&gt; flag stands for "message" and allows you to include your commit message directly from the command line. Instead of opening a text editor to write your commit message, you simply add it as part of the command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add . //or git add &amp;lt;file-name&amp;gt;
git commit -m "Fixed user authentication bug"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to Use &lt;code&gt;-m&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you want to quickly commit changes with a brief message.&lt;/li&gt;
&lt;li&gt;For small, isolated changes that don’t require detailed explanations.&lt;/li&gt;
&lt;li&gt;When you're working in a collaborative environment and need to commit changes frequently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Git’s &lt;code&gt;-am&lt;/code&gt; Option: Stage and Commit All Changes&lt;/strong&gt;&lt;br&gt;
While the &lt;code&gt;-m&lt;/code&gt; flag is useful for adding a message, the &lt;code&gt;-am&lt;/code&gt; flag is a combination of two flags:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-a&lt;/code&gt;: Stands for "all" and stages all changes to tracked files (files that are already being tracked by Git).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-m&lt;/code&gt;: As before, this allows you to specify a commit message.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In essence, &lt;code&gt;git commit -am&lt;/code&gt; stages and commits all the modified files in one command. This can save you a step by automatically staging files that have been changed, so you don't need to run &lt;code&gt;git add&lt;/code&gt; separately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -am "Refactored login component and updated styles"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, Git will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stage&lt;/strong&gt; all the modified files (i.e., any changes you've made to tracked files).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commit&lt;/strong&gt; those changes with the message "Refactored components and updated styles".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When to Use &lt;code&gt;-am&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you have multiple changes to tracked files and want to commit them all in one go.&lt;/li&gt;
&lt;li&gt;When you're working on a large project and don't want to manually stage each file before committing.&lt;/li&gt;
&lt;li&gt;For quick, iterative commits where you’re not adding any new files, only modifying existing ones.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;-m&lt;/code&gt; vs &lt;code&gt;-am&lt;/code&gt;: Which One Should You Use?&lt;/strong&gt;&lt;br&gt;
While both options streamline your Git workflow, they serve different purposes. If you’re making small, focused changes and want to explicitly decide which files to commit, use the &lt;code&gt;-m&lt;/code&gt; option. It gives you more control over what gets included in the commit.&lt;/p&gt;

&lt;p&gt;On the other hand, if you’re working on a larger update that involves modifying several tracked files, &lt;code&gt;-am&lt;/code&gt; is a time-saver. It stages all your modified files and commits them in one step, letting you focus on the work rather than managing file stages.&lt;/p&gt;

&lt;p&gt;Now that you understand the differences between &lt;code&gt;-m&lt;/code&gt; and &lt;code&gt;-am&lt;/code&gt;, you can incorporate these options into your daily Git workflow for a more efficient, organized process. &lt;/p&gt;

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

</description>
      <category>git</category>
      <category>github</category>
      <category>gitlab</category>
      <category>coding</category>
    </item>
    <item>
      <title>Building a Simple Chrome Extension with Next.js</title>
      <dc:creator>Shyamalendu Nayak</dc:creator>
      <pubDate>Sun, 08 Sep 2024 11:40:54 +0000</pubDate>
      <link>https://dev.to/shyam0118/building-a-simple-chrome-extension-with-nextjs-3coc</link>
      <guid>https://dev.to/shyam0118/building-a-simple-chrome-extension-with-nextjs-3coc</guid>
      <description>&lt;p&gt;Creating a Chrome extension can seem daunting, but with the power of Next.js and some basic knowledge, you can have a working extension up and running in no time. In this blog post, we'll walk through the process of building a simple Chrome extension using Next.js, setting up icons, and configuring the necessary files.&lt;/p&gt;

&lt;p&gt;What You'll Need&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Node.js: Make sure you have Node.js installed.&lt;/li&gt;
&lt;li&gt;Next.js: We'll be using Next.js for our project setup.&lt;/li&gt;
&lt;li&gt;Basic HTML, CSS, and JavaScript: Familiarity with these is helpful     but not required.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Setting Up Your Next.js Project&lt;/strong&gt;&lt;br&gt;
First, let's create a new Next.js project. Open your terminal and run the following commands:&lt;br&gt;
&lt;code&gt;npx create-next-app@latest my-chrome-extension&lt;/code&gt;&lt;br&gt;
&lt;code&gt;cd my-chrome-extension&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will scaffold a new Next.js project for you. Once the setup is complete, navigate into your project directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Adding a "Hello World" Component&lt;/strong&gt;&lt;br&gt;
To display a simple "Hello World" message in your Chrome extension, you'll need to create a React component in your Next.js project. This component will be part of the static files exported to the &lt;code&gt;out&lt;/code&gt; folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default function Home() {
  return (
    &amp;lt;main&amp;gt;
      &amp;lt;div&amp;gt;
        &amp;lt;span className="text-gray-800"&amp;gt;Hello world&amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/main&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Configure Next.js for Static Export&lt;/strong&gt;&lt;br&gt;
Since Chrome extensions are static by nature, we need to configure our Next.js project to generate static files. Edit your next.config.js file as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/** @type {import('next').NextConfig} */
const nextConfig = {
    reactStrictMode: true,
    assetPrefix: process.env.NODE_ENV === 'production' ? '/.' : '',
    output: 'export',
    trailingSlash: true,
  };

  export default nextConfig;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration ensures that your Next.js application is exported as static files, ready to be used in a Chrome extension.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Creating the Chrome Extension Manifest&lt;/strong&gt;&lt;br&gt;
A Chrome extension requires a manifest.json file to define the extension's metadata and behavior. Create a manifest.json file in your project's root directory with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "manifest_version": 3,
  "name": "Hello world Extension",
  "version": "1.0",
  "description": "Extension that displays hello world.",
  "action": {
    "default_popup": "index.html",
    "default_icon": {
      "16": "icon16.svg",
      "48": "icon48.svg",
      "128": "icon128.svg"
    }
  },
  "icons": {
    "16": "icon16.png",
    "48": "icon48.png",
    "128": "icon128.png"
  },
  "content_security_policy": {
    "extension_pages": "script-src 'self'; object-src 'self';"
  }
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5: Build the Project&lt;/strong&gt;&lt;br&gt;
With the configuration in place, let's build the project:&lt;br&gt;
&lt;code&gt;npm run build&lt;/code&gt;&lt;br&gt;
This command will generate a static version of your site in the out folder, which is what we'll use for our Chrome extension.&lt;br&gt;
Now rename the &lt;code&gt;_next&lt;/code&gt; file in the &lt;code&gt;out&lt;/code&gt; folder as chrome extensions cannot include directories or filenames that start with an underscore (e.g., _next).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Adding Icons&lt;/strong&gt;&lt;br&gt;
Chrome extensions require icons of various sizes for different parts of the UI. Create an icons directory within your project and add the following icon files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;icon16.png (16x16 pixels)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;icon48.png (48x48 pixels)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;icon128.png (128x128 pixels)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make sure these icons are correctly sized and placed in the icons directory. The paths in the manifest.json file should match the location of these icons.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7: Load the Extension into Chrome&lt;/strong&gt;&lt;br&gt;
Now that everything is set up, let's load our extension into Chrome:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open Chrome and navigate to chrome://extensions/.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enable "Developer mode" by toggling the switch in the top-right corner.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click "Load unpacked" and select the out folder generated by the build process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test Your Extension: You should see your extension in the Chrome toolbar. Clicking on it should display the "Hello World" message you set up in your Next.js project.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 8: Test and Iterate&lt;/strong&gt;&lt;br&gt;
Your basic "Hello World" Chrome extension is now up and running! From here, you can add more functionality, styles, and features as needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
Building a Chrome extension using Next.js allows you to leverage the power of modern React-based development while still creating something simple and static. &lt;/p&gt;

&lt;p&gt;Whether you're creating a personal tool or something to share with the world, Next.js makes the development process smooth and efficient.&lt;/p&gt;

&lt;p&gt;With the knowledge from this guide, you can easily create more complex extensions, integrate APIs, or enhance the user experience with custom styles and interactivity. The sky's the limit!&lt;/p&gt;

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

</description>
      <category>extensions</category>
      <category>nextjs</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
