<?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: Stefania Barabas</title>
    <description>The latest articles on DEV Community by Stefania Barabas (@stefania_barabas).</description>
    <link>https://dev.to/stefania_barabas</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%2F1577755%2F6c216dbd-6351-4a59-9ec2-31cfa2f9fc7a.jpg</url>
      <title>DEV Community: Stefania Barabas</title>
      <link>https://dev.to/stefania_barabas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stefania_barabas"/>
    <language>en</language>
    <item>
      <title>Virtual Scrolling Architecture in React.js — Why Tables Lose Data and How to Maintain Visual State</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Fri, 27 Jun 2025 07:37:41 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/virtual-scrolling-architecture-in-reactjs-why-tables-lose-data-and-how-to-maintain-visual-state-57pk</link>
      <guid>https://dev.to/stefania_barabas/virtual-scrolling-architecture-in-reactjs-why-tables-lose-data-and-how-to-maintain-visual-state-57pk</guid>
      <description>&lt;p&gt;Read more about it here: &lt;a href="https://stefsdevnotes.substack.com/p/virtual-scrolling-architecture-react" rel="noopener noreferrer"&gt;https://stefsdevnotes.substack.com/p/virtual-scrolling-architecture-react&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>virtualscroll</category>
      <category>statemanagement</category>
      <category>frontend</category>
    </item>
    <item>
      <title>What happens when a team isn’t prepared to welcome those proactive questions or actions?</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Fri, 27 Jun 2025 07:36:31 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/what-happens-when-a-team-isnt-prepared-to-welcome-those-proactive-questions-or-actions-1l2g</link>
      <guid>https://dev.to/stefania_barabas/what-happens-when-a-team-isnt-prepared-to-welcome-those-proactive-questions-or-actions-1l2g</guid>
      <description>&lt;p&gt;Read more about it here: &lt;a href="https://stefsdevnotes.substack.com/p/proactiveness-runs-in-teams" rel="noopener noreferrer"&gt;https://stefsdevnotes.substack.com/p/proactiveness-runs-in-teams&lt;/a&gt;&lt;/p&gt;

</description>
      <category>proactiveness</category>
      <category>webdev</category>
      <category>programming</category>
      <category>teamwork</category>
    </item>
    <item>
      <title>10 Frontend Principles That Work in Any Framework</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Thu, 05 Jun 2025 14:13:16 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/httpsstefsdevnotessubstackcompfrontend-principles-any-frameworkutmsourcedevto-ibh</link>
      <guid>https://dev.to/stefania_barabas/httpsstefsdevnotessubstackcompfrontend-principles-any-frameworkutmsourcedevto-ibh</guid>
      <description></description>
      <category>frontend</category>
      <category>vue</category>
      <category>react</category>
      <category>angular</category>
    </item>
    <item>
      <title>New post on Stef's Dev Notes: https://stefsdevnotes.substack.com/p/reactjs-understanding-usecallback?r=aehwm</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Tue, 04 Mar 2025 13:19:11 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/new-post-on-stefs-dev-notes-1616</link>
      <guid>https://dev.to/stefania_barabas/new-post-on-stefs-dev-notes-1616</guid>
      <description></description>
      <category>react</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>#NextJS 🛟 : How Companies Optimize Caching for Scalability</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Wed, 12 Feb 2025 08:12:38 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/nextjs-how-companies-optimize-caching-for-scalability-29gh</link>
      <guid>https://dev.to/stefania_barabas/nextjs-how-companies-optimize-caching-for-scalability-29gh</guid>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;There's a new article in the ♻️ Knowledge seeks community 🫶 collection.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚀 Get articles like this delivered straight to your inbox. Subscribe to &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&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%2Fd46hiozivkj0xn3pz6ru.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%2Fd46hiozivkj0xn3pz6ru.png" alt="Stef's Dev Notes - Caching for Scalability" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;🌟&lt;/strong&gt; Introduction
&lt;/h2&gt;

&lt;p&gt;Caching is a powerful technique for improving web performance and scalability in the context of modern web development. It &lt;strong&gt;reduces server load&lt;/strong&gt;, &lt;strong&gt;speeds up content delivery&lt;/strong&gt;, and ensures a &lt;strong&gt;better and smoother user experience.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Choosing the right caching strategy can be challenging, especially for high-traffic applications that require a balance between &lt;strong&gt;speed and data freshness&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔄 Understanding Caching Strategies in Modern Web Apps
&lt;/h2&gt;

&lt;p&gt;Before diving into case studies, let’s quickly cover the key caching strategies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server-side caching:&lt;/strong&gt; Using Next.js features like &lt;strong&gt;Incremental Static Regeneration (ISR)&lt;/strong&gt; and &lt;strong&gt;Server-Side Rendering (SSR)&lt;/strong&gt; to control data freshness.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client-side caching:&lt;/strong&gt; Leveraging browser cache and &lt;strong&gt;Service Workers&lt;/strong&gt; for faster repeat visits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN caching:&lt;/strong&gt; Storing static assets and API responses at edge locations for reduced latency.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;🚀&lt;/strong&gt; Real-world use cases:
&lt;/h2&gt;

&lt;p&gt;We’ll look at real-world use cases from companies such as &lt;strong&gt;Vercel&lt;/strong&gt; and &lt;strong&gt;Airbnb&lt;/strong&gt; in order to see how they optimize caching to handle millions of users efficiently. Even though, the second company mentioned is not necessarily using &lt;strong&gt;Next.js&lt;/strong&gt; for its main platform, we will look at its caching strategy as an inspiration for future &lt;strong&gt;Next.js&lt;/strong&gt; applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Case 1: Vercel - How Vercel optimizes caching for deployments and previews
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;🔍 Problem&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Vercel hosts thousands of &lt;strong&gt;Next.js applications&lt;/strong&gt;, needing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast build times&lt;/strong&gt; for developers deploying changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficient caching&lt;/strong&gt; for assets and API responses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edge delivery&lt;/strong&gt; to ensure global performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;🔧 Solution&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Vercel uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ISR (&lt;code&gt;revalidate&lt;/code&gt;)&lt;/strong&gt; to enable dynamic content updates without rebuilding everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN edge caching&lt;/strong&gt; for pre-rendered pages and assets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Serverless functions (&lt;code&gt;cache: 'no-store'&lt;/code&gt;)&lt;/strong&gt; to avoid stale API data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;✅ Outcome&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faster deployments with instant cache invalidation&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lower backend load&lt;/strong&gt; since static pages are cached globally.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optimized performance for dynamic and static sites.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🔑 Key Takeaway:&lt;/strong&gt; Next.js with ISR and CDN caching enables fast updates while reducing backend stress.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Case 2: Airbnb - Ensuring Fresh Data for Real-Time Booking
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;🔍 Problem&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Airbnb listings change &lt;strong&gt;in real time&lt;/strong&gt;, and stale data can cause:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Double bookings&lt;/strong&gt; when availability isn’t updated fast enough.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Delayed search results&lt;/strong&gt;, frustrating users.&lt;/li&gt;
&lt;li&gt;High backend traffic from &lt;strong&gt;constant API calls&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;🔧 Solution&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Airbnb optimized caching by using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SSR (&lt;code&gt;cache: 'no-store'&lt;/code&gt;)&lt;/strong&gt; → Ensures real-time availability updates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static caching (&lt;code&gt;force-cache&lt;/code&gt;)&lt;/strong&gt; for listing details and images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN caching&lt;/strong&gt; to distribute static assets globally.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;✅ Outcome&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Reduced booking conflicts.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster response times&lt;/strong&gt; globally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;More scalable backend&lt;/strong&gt;, as only dynamic data hits the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🔑 Key Takeaway:&lt;/strong&gt; When real-time accuracy is critical, &lt;strong&gt;SSR + selective static caching&lt;/strong&gt; is the best approach.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🌟&lt;/strong&gt; Takeaways for your future Next.js App
&lt;/h2&gt;

&lt;p&gt;The best caching strategy &lt;strong&gt;depends on your data&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;For frequently updated but non-critical data&lt;/strong&gt; (like blog posts) → Use &lt;strong&gt;ISR (&lt;code&gt;revalidate&lt;/code&gt;) + CDN caching&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For real-time updates that must be fresh&lt;/strong&gt; (like transactions) → Use &lt;strong&gt;SSR (&lt;code&gt;cache: 'no-store'&lt;/code&gt;)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For static content&lt;/strong&gt; (like images, assets) → Use &lt;strong&gt;force-cache + long TTLs&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mixing these strategies ensures &lt;strong&gt;better performance, lower costs, and higher scalability&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Until next time 👋,&lt;/p&gt;

&lt;p&gt;Stefania&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S. Don’t forget to like, comment, and share with others if you found this helpful!&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  💬 Let’s talk:
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;What &lt;strong&gt;caching strategy&lt;/strong&gt; does your app use?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Let’s discuss in the comments!&lt;/em&gt; 🚀&lt;/p&gt;




&lt;h3&gt;
  
  
  Other articles from the &lt;strong&gt;♻️ Knowledge seeks community 🫶&lt;/strong&gt; collection: &lt;a href="https://stefsdevnotes.substack.com/t/knowledgeseekscommunity" rel="noopener noreferrer"&gt;https://stefsdevnotes.substack.com/t/knowledgeseekscommunity&lt;/a&gt;
&lt;/h3&gt;




&lt;h3&gt;
  
  
  👋 Get in touch
&lt;/h3&gt;

&lt;p&gt;You can find me on &lt;a href="https://www.linkedin.com/in/stefania-barabas" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; where I share updates about what’s next on &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;, as well as information about various tech events and other topics.&lt;/p&gt;

&lt;p&gt;You can learn more about Frontend Development, JavaScript, Typescript, React, Next and Node.js in my newsletter: &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>caching</category>
      <category>programming</category>
      <category>frontend</category>
      <category>scalability</category>
    </item>
    <item>
      <title>#JS📔: Mastering Async/Await in Javascript</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Fri, 07 Feb 2025 14:59:54 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/js-mastering-asyncawait-in-javascript-19g2</link>
      <guid>https://dev.to/stefania_barabas/js-mastering-asyncawait-in-javascript-19g2</guid>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;I am back with a new article from the ♻️ Knowledge seeks community 🫶 collection.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚀 Get articles like this delivered straight to your inbox. Subscribe to &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this article, we'll explore how &lt;code&gt;async/await&lt;/code&gt; works, best practices for using it effectively, and common pitfalls to avoid.&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%2F8zsxwqxgemr20fj2hj2u.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%2F8zsxwqxgemr20fj2hj2u.png" alt="Stef's Dev Notes - Async/await" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Asynchronous programming is an essential part of JavaScript, especially in modern web development where non-blocking operations like API calls and timers are common. &lt;/p&gt;

&lt;p&gt;Over the years, JavaScript has evolved from callbacks to Promises, and now to async/await, which provides a more readable and maintainable way to handle asynchronous code.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Async/Await?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;async/await&lt;/code&gt; is a syntactic improvement over Promises that makes asynchronous code look and behave more like synchronous code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;async&lt;/code&gt; keyword is used to define a function that returns a Promise.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;await&lt;/code&gt; keyword pauses execution until the Promise is resolved, making it easier to work with asynchronous operations&lt;/li&gt;
&lt;/ul&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%2Fyipto88p8rk21a3mfjcl.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%2Fyipto88p8rk21a3mfjcl.png" alt="Stef's Dev Notes - Async/await 2" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a basic example where fetchData automatically returns a Promise. When we call it, we can use &lt;code&gt;.then()&lt;/code&gt; to handle the resolved value.&lt;/p&gt;

&lt;p&gt;But let’s see how await works in an example where we fetch data from an external API.&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%2F5hd30fn0et34v6fw0b33.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%2F5hd30fn0et34v6fw0b33.png" alt="Stef's Dev Notes - Async/await 3" width="800" height="826"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This time, we don’t use the &lt;code&gt;.then()&lt;/code&gt; chains and instead we use &lt;code&gt;await&lt;/code&gt;, which pauses the execution of the function until the API call completes. &lt;/p&gt;

&lt;h2&gt;
  
  
  🙋 Problems and solutions
&lt;/h2&gt;

&lt;p&gt;Following the problem-solution approach, let’s tackle together some well known &lt;code&gt;async/await&lt;/code&gt; problems and explore their optimal solutions. ⬇️&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Performance Bottlenecks: Sequential vs. Parallel Execution
&lt;/h3&gt;

&lt;p&gt;🔴 &lt;strong&gt;Problem&lt;/strong&gt;: Fetching multiple API resources sequentially slows down the execution.&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%2Fr1psd8ge4blf81n7fpn1.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%2Fr1psd8ge4blf81n7fpn1.png" alt="Stef's Dev Notes - Async/await 4" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🟢 &lt;strong&gt;Solution&lt;/strong&gt;: Use Promise.all() to fetch data in parallel.&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%2F1qjfw9dtqbal6332jt3n.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%2F1qjfw9dtqbal6332jt3n.png" alt="Stef's Dev Notes - Async/await 5" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using Promise.all() will reduce overall response time by executing the requests concurrently.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Handling Multiple Requests Safely: Overloading the Server
&lt;/h3&gt;

&lt;p&gt;🔴 &lt;strong&gt;Problem&lt;/strong&gt;: Fetching too many resources at once (e.g., 100 API calls) can overwhelm the backend.&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%2Fnqko0qqsfsqqbb12xo4v.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%2Fnqko0qqsfsqqbb12xo4v.png" alt="Stef's Dev Notes - Async/await 6" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🟢 &lt;strong&gt;Solution&lt;/strong&gt;: Use request throttling with &lt;a href="https://www.npmjs.com/package/p-limit" rel="noopener noreferrer"&gt;&lt;code&gt;p-limit&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.freecodecamp.org/news/throttling-in-javascript/#heading-what-is-throttling" rel="noopener noreferrer"&gt;What does throttling mean?&lt;/a&gt;&lt;/strong&gt;  Throttling is a technique used to limit the rate at which a function is called. Throttling transforms a function such that it can only be called once in a specific interval of time. &lt;/p&gt;
&lt;/blockquote&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%2Fua7xvldn78w4jfsgorcr.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%2Fua7xvldn78w4jfsgorcr.png" alt="Stef's Dev Notes - Async/await 7" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This prevents excessive concurrent requests, improving stability.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Dealing with Unresponsive APIs: Preventing Stuck Requests
&lt;/h3&gt;

&lt;p&gt;🔴 &lt;strong&gt;Problem&lt;/strong&gt;: API requests hang indefinitely if no response is received.&lt;/p&gt;

&lt;p&gt;When making API calls, network requests can sometimes hang indefinitely due to server issues, bad internet connections, or backend timeouts. If you don’t set a timeout, your application might stay stuck waiting for a response that never arrives.&lt;/p&gt;

&lt;p&gt;🟢 &lt;strong&gt;Solution&lt;/strong&gt;: Implement timeouts with &lt;code&gt;Promise.race()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;JavaScript doesn’t have built-in timeout handling for &lt;code&gt;fetch()&lt;/code&gt;, but &lt;code&gt;Promise.race()&lt;/code&gt; allows us to race the API request against a timeout promise. The first promise that resolves or rejects will determine the outcome.&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%2F68ydt7vpvhmm2uxaaydg.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%2F68ydt7vpvhmm2uxaaydg.png" alt="Stef's Dev Notes - Async/await 8" width="800" height="603"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Handling Errors Properly: Avoiding Silent Failures
&lt;/h3&gt;

&lt;p&gt;🔴 &lt;strong&gt;Problem&lt;/strong&gt;: Unhandled async errors cause silent failures in production.&lt;/p&gt;

&lt;p&gt;🟢 &lt;strong&gt;Solution&lt;/strong&gt;: Use &lt;code&gt;try/catch&lt;/code&gt; in order  to handle async errors.&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%2Fc3v7qev12mcq3n4xc5yq.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%2Fc3v7qev12mcq3n4xc5yq.png" alt="Stef's Dev Notes - Async/await 9" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This makes error handling more intuitive and structured.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Debugging Async/Await Effectively
&lt;/h3&gt;

&lt;p&gt;🔴 &lt;strong&gt;Problem&lt;/strong&gt;: Tracing async function execution is challenging due to JavaScript’s event loop.&lt;/p&gt;

&lt;p&gt;🟢 &lt;strong&gt;Solution&lt;/strong&gt;: Use Chrome DevTools’ async call stack and structured logging.&lt;/p&gt;

&lt;p&gt;In Chrome DevTools, go to the Sources tab, set breakpoints in async functions, and check the &lt;strong&gt;Call Stack&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;Enable &lt;strong&gt;async stack traces&lt;/strong&gt; in Node.js using &lt;code&gt;-async-stack-traces&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Use structured logging:&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%2Fseqig2se8c3otxz3rc3e.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%2Fseqig2se8c3otxz3rc3e.png" alt="Stef's Dev Notes - Async/await 10" width="800" height="427"&gt;&lt;/a&gt;&lt;br&gt;
This makes debugging more efficient and traceable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;async/await&lt;/code&gt; makes asynchronous code more readable and maintainable.&lt;/li&gt;
&lt;li&gt;Always handle errors with try/catch.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;Promise.all()&lt;/code&gt; for parallel execution, but throttle when necessary.&lt;/li&gt;
&lt;li&gt;Handle failures gracefully with &lt;code&gt;Promise.allSettled()&lt;/code&gt; or timeouts with &lt;code&gt;Promise.race()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Leverage DevTools and structured logging for better debugging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By applying these solutions, you can write robust, scalable, and high-performance async JavaScript code. 🚀&lt;/p&gt;

&lt;p&gt;Until next time 👋,&lt;/p&gt;

&lt;p&gt;Stefania&lt;/p&gt;

&lt;h2&gt;
  
  
  💬 Let’s talk:
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Have you encountered other async/await challenges? &lt;br&gt;
Let’s discuss in the comments!&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  👋 Get in touch
&lt;/h3&gt;

&lt;p&gt;You can find me on &lt;a href="https://www.linkedin.com/in/stefania-barabas" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; where I share updates about what’s next on &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;, as well as information about various tech events and other topics.&lt;/p&gt;

&lt;p&gt;You can learn more about Frontend Development, JavaScript, Typescript, React, Next and Node.js in my newsletter: &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
      <category>learning</category>
    </item>
    <item>
      <title>#JS📔 - Removing Duplicates from an Array of Objects</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Thu, 30 Jan 2025 14:03:20 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/js-removing-duplicates-from-an-array-of-objects-o6i</link>
      <guid>https://dev.to/stefania_barabas/js-removing-duplicates-from-an-array-of-objects-o6i</guid>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;I've created a new collection of articles called - &lt;a href="https://stefsdevnotes.substack.com/t/knowledgeseekscommunity" rel="noopener noreferrer"&gt;♻️ Knowledge seeks community 🫶&lt;/a&gt; - and it will be dedicated to sharing knowledge through the problem-solution-perfomance comparison approach.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚀 Get articles like this delivered straight to your inbox. Subscribe to &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Today’s topic is JS related: &lt;strong&gt;Removing Duplicates from an Array of Objects.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&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%2Fbgp09byhtufn4yb1cl6q.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%2Fbgp09byhtufn4yb1cl6q.png" alt="Snippet 1" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, removing duplicates from an array of primitive values (numbers or strings) can be done easily using &lt;code&gt;Set&lt;/code&gt;. However, when dealing with arrays of objects, things get tricky because objects are reference types.&lt;/p&gt;

&lt;p&gt;This article explores multiple ways to efficiently remove duplicates from an array of objects, discussing their trade-offs and best use cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚩 Problem
&lt;/h2&gt;

&lt;p&gt;Let’s see the following example:&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%2Fluhrvkqqjl9llbmb5nvv.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%2Fluhrvkqqjl9llbmb5nvv.png" alt="Snippet 2" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does it fail?
&lt;/h3&gt;

&lt;p&gt;The issue with this solution is that &lt;code&gt;Set&lt;/code&gt; only removes duplicates for &lt;strong&gt;primitive values&lt;/strong&gt; (like numbers or strings), but the given list contains objects. When you pass an array of objects to &lt;code&gt;new Set()&lt;/code&gt;, it does not remove duplicates because objects are &lt;strong&gt;reference types&lt;/strong&gt;, and each object has a unique reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 Solutions
&lt;/h2&gt;

&lt;p&gt;We will go through some use cases in order to explore different solutions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution #1: Removing Duplicates by a Unique Key (&lt;code&gt;id&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;If objects have a unique identifier, we can use &lt;code&gt;Map&lt;/code&gt; to remove duplicates efficiently.&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%2Foicfodp5a5p3vs75qdv6.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%2Foicfodp5a5p3vs75qdv6.png" alt="Snippet 3" width="800" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This ensures that objects with duplicate id values are removed while keeping only the first occurrence.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution #2: Removing Duplicates Based on All Object Properties
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Using &lt;code&gt;Set()&lt;/code&gt; + &lt;code&gt;JSON.stringify()&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This solution is order-sensitive, meaning that all the objects should have the properties in the same order.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2F2rlwhq452itsh8rcb5be.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%2F2rlwhq452itsh8rcb5be.png" alt="Snippet 4" width="800" height="681"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution #3: Handling Objects with Different Property Orders
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using &lt;code&gt;Set()&lt;/code&gt; + &lt;code&gt;JSON.stringify()&lt;/code&gt;as a sorted JSON string&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sorting object keys before stringifying ensures identical objects are treated the same.&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%2Fl3uj096tqigkkypw2cal.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%2Fl3uj096tqigkkypw2cal.png" alt="Snippet 5" width="800" height="805"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution #4: Deep Comparison with Lodash (&lt;code&gt;_.isEqual&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;For complex objects, Lodash’s &lt;code&gt;_.isEqual()&lt;/code&gt; performs a deep comparison.&lt;/li&gt;
&lt;/ul&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%2Fxbv9itk45fuoo5o1k1ro.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%2Fxbv9itk45fuoo5o1k1ro.png" alt="Snippet 6" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance Comparison
&lt;/h2&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%2Ft7fb5t0ra820j4fj0z7d.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%2Ft7fb5t0ra820j4fj0z7d.png" alt="Snippet 7" width="800" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Time complexity explanation - what are those values?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;O(n)&lt;/code&gt; - Linear Time Complexity: The execution time grows linearly with the number of elements (n) in the array&lt;br&gt;
Example: Iterating through an array once.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;O(n²)&lt;/code&gt;- Quadratic Time Complexity: The execution time grows quadratically with the number of elements (n)&lt;br&gt;
Example: A nested loop where every element is compared to every other element.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🗒️ If you want to know more about time and space complexity in Javascript, check &lt;a href="https://gist.github.com/thm-design/af870d56b608ae96acf052380a986e6a" rel="noopener noreferrer"&gt;this resource&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏆 Challenge: Handling Arrays Inside Objects
&lt;/h2&gt;

&lt;p&gt;Now, I’m challenging you to do a small exercise by solving the following scenario:&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%2Fh42ab6y6s09kt8bj6ra8.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%2Fh42ab6y6s09kt8bj6ra8.png" alt="Snippet 8" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S. To ensure your solution meets the required time and space complexity, I recommend testing it with a larger dataset and observing its performance.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.P.S. In addition to the solutions discussed in the article, I suggest experimenting with the &lt;code&gt;structuredClone()&lt;/code&gt; algorithm.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Choosing the right approach depends on your dataset size and structure.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For large datasets, you should use &lt;code&gt;Map&lt;/code&gt; or &lt;code&gt;Set&lt;/code&gt;-based solutions for efficiency.&lt;/li&gt;
&lt;li&gt;For deeply nested objects, you can go with Lodash &lt;code&gt;_.isEqual()&lt;/code&gt;,but expect performance trade-offs, or with &lt;code&gt;structuredClone()&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💬 Let’s talk:
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Have you encountered this issue in a real project? Which solution worked best for you? Let me know in the comments!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Until next time 👋,&lt;/p&gt;

&lt;p&gt;Stefania&lt;/p&gt;




&lt;h3&gt;
  
  
  👋 Get in touch
&lt;/h3&gt;

&lt;p&gt;You can find me on &lt;a href="https://www.linkedin.com/in/stefania-barabas" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; where I share updates about what’s next on &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;, as well as information about various tech events and other topics.&lt;/p&gt;

&lt;p&gt;You can learn more about Frontend Development, JavaScript, Typescript, React, Next and Node.js in my newsletter: &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>arrays</category>
      <category>learning</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🚀 Build Faster, Code Smarter: My Experience with GitHub Copilot 👉 Check it out here: https://lnkd.in/dR8rFErR #GitHubCopilot hashtag#AIInDevelopment hashtag#ProductivityHacks hashtag#SoftwareEngineering</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Mon, 27 Jan 2025 15:11:33 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/build-faster-code-smarter-my-experience-with-github-copilot-check-it-out-here-37dj</link>
      <guid>https://dev.to/stefania_barabas/build-faster-code-smarter-my-experience-with-github-copilot-check-it-out-here-37dj</guid>
      <description></description>
    </item>
    <item>
      <title>Building faster with Github Copilot</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Wed, 22 Jan 2025 17:30:38 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/building-faster-with-github-copilot-4o8a</link>
      <guid>https://dev.to/stefania_barabas/building-faster-with-github-copilot-4o8a</guid>
      <description>&lt;p&gt;The AI revolution is upon us, and I've been on a journey of discovery. This article will share some of my thoughts and findings from research and hands-on experimentation, with a particular sight on my experiences using  &lt;a href="https://github.com/features/copilot" rel="noopener noreferrer"&gt;GitHub Copilot&lt;/a&gt;.&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%2Fb6tnu3wgrk9y6rf2qd1a.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%2Fb6tnu3wgrk9y6rf2qd1a.png" alt="Stef's Dev Notes - Github Copilot" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Some context about Github Copilot
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;GitHub Copilot is an AI-powered coding assistant that helps developers write code faster by suggesting code completions and even entire functions as they type. It's like having an AI pair programmer working alongside you&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it works:&lt;/strong&gt; Copilot analyzes your code, comments, and even the names of variables to predict the code you might want to write next.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What it does:&lt;/strong&gt; It suggests code completions, generates entire functions, and can even help you refactor existing code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benefits:&lt;/strong&gt; Increased coding speed, reduced repetitive tasks, and the opportunity to explore new coding techniques.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Good news!&lt;/strong&gt; Back in December 2024, &lt;strong&gt;Github Copilot&lt;/strong&gt; announced a new free tier for GitHub Copilot in VS Code by giving everyone access to 2,000 code completions and 50 chat messages per month, simply by signing in with their Github account. If you want to find more about this, check &lt;a href="https://github.blog/news-insights/product-news/github-copilot-in-vscode-free/" rel="noopener noreferrer"&gt;this link&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I build faster with Github Copilot?
&lt;/h3&gt;

&lt;p&gt;While developing Frontend projects, Copilot assisted me by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Creating common configuration files&lt;/strong&gt; such as .gitignore, README.md, .env, DockerFile and others.&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%2F2ffgzhofgeem9tyr3sqi.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%2F2ffgzhofgeem9tyr3sqi.png" alt="Stef's Dev Notes - Github Copilot usage#1" width="800" height="1206"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Creating custom components&lt;/strong&gt; for specialized functionalities, such as a rich text renderer for specific content types. &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%2Fcku9ue3iqb7oxshuw55i.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%2Fcku9ue3iqb7oxshuw55i.png" alt="Stef's Dev Notes - Github Copilot usage#2" width="718" height="1027"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generating Fetch Logic:&lt;/strong&gt; When integrating APIs and creating the application’s core functionality, Copilot can create fetch functions or Axios request, complete with error handling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Simplification:&lt;/strong&gt; When refactoring, Copilot might suggest cleaner, more efficient code snippets.&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%2Ff13vsvcuclb3ubminqiv.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%2Ff13vsvcuclb3ubminqiv.png" alt="Stef's Dev Notes - Github Copilot usage#3" width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learning:&lt;/strong&gt; You can also ask questions about things that you don’t fully understand or you are not sure about it, and Copilot will give you an explanation with examples. Analyzing the suggestions provided by Copilot can be a valuable learning experience. It can help you understand different approaches to solving a problem and improve your own coding skills.&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%2Fmffms4mkizppn1s1d6c3.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%2Fmffms4mkizppn1s1d6c3.png" alt="Stef's Dev Notes - Github Copilot usage#4" width="698" height="1028"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Will NPM remain relevant?
&lt;/h3&gt;

&lt;p&gt;While developing dynamic content blocks in Strapi CMS for a Next.js project, I encountered a compatibility issue. The chosen rich text renderer library lacked support for React v19, which my Next.js project relied on. To avoid significant time investment on a workaround, I leveraged GitHub Copilot to build the required functionality. While this solution satisfied my needs and it gave me the chance to understand how easy it is to find a solution quickly, it prompted me to consider the potential long-term implications of relying heavily on AI-generated code instead of established libraries.&lt;/p&gt;

&lt;p&gt;I believe that despite the rise of AI-powered tools like GitHub Copilot, NPM will remain relevant because it offers well-tested, optimized libraries that save time and handle edge cases better than AI-generated code. Libraries provide reusability, community support, and security updates that AI can’t match (or at least, not yet 😅). Copilot can complement NPM by helping developers integrate libraries efficiently, rather than replacing them. &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;GitHub Copilot is more than just an assistant; it’s a powerful friend in your development journey. By automating repetitive tasks, generating boilerplate code, and offering intelligent suggestions, it enables frontend developers to channel their energy into crafting innovative solutions and exceptional user experiences. &lt;/p&gt;

&lt;p&gt;As for my question regarding NPM remaining relevant, I believe that while AI may reduce reliance on smaller utilities, robust libraries and frameworks will continue to be essential for complex, scalable projects.&lt;/p&gt;

&lt;p&gt;Until next time 👋,&lt;/p&gt;

&lt;p&gt;Stefania&lt;/p&gt;

&lt;p&gt;&lt;em&gt;P.S. Don’t forget to like, comment, and share with others if you found this helpful!&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🫶 My Favorite Articles This Week:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://strategizeyourcareer.com/p/the-hotest-programming-language-in-2025" rel="noopener noreferrer"&gt;The hottest programming language in 2025&lt;/a&gt;&lt;/strong&gt; by Fran Soto -Love the way this article tackles a real challenge in software development - "being able to translate thoughts to code".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://thetshaped.dev/p/building-react-components-turning-ui-designs-into-react-components" rel="noopener noreferrer"&gt;Building React Components: Turning UI Designs Into React Components&lt;/a&gt;&lt;/strong&gt; by Petar Ivanov - I found this article essential especially for those who are just embarking on a web development journey. It’s an essential skill to know how to efficiently split the design into components, which can set the base for growth and scalability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://open.substack.com/pub/systemdesignone/p/how-do-airtags-work?r=aehwm&amp;amp;utm_campaign=post&amp;amp;utm_medium=email" rel="noopener noreferrer"&gt;How Do AirTags Work &lt;/a&gt;&lt;/strong&gt; by Neo Kim - Neo Kim’s articles about system design and how it gets implemented in products that we all use, are my favorite ones. I believe it offers the best way to understand system design implementation and how products such as AirTags, Shopify and many others rely on it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://www.saiyangrowthletter.com/p/ship-anything-with-success-a-full" rel="noopener noreferrer"&gt;Ship anything with success (a full framework)&lt;/a&gt;&lt;/strong&gt; by Tiger Abrodi - This article presents the software development process as a comprehensive framework, where  coding is only one aspect and other principles are playing a more significant role.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🚀 Latest discoveries
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.coderabbit.ai/" rel="noopener noreferrer"&gt;CodeRabbit&lt;/a&gt;&lt;/strong&gt;  -  I’ve integrated CodeRabbit in one of my side projects and I have to say that I love it so far. It is a great code review tool powered by AI which provides valuable insights and suggestions for improving your code. I find it very useful especially while I’m working solo an a project. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.warp.dev/" rel="noopener noreferrer"&gt;Warp Terminal&lt;/a&gt;&lt;/strong&gt; - This terminal is just something else! I love its design and the fact that I feel like I can do everything with it. &lt;/p&gt;

&lt;h3&gt;
  
  
  👋 Get in touch
&lt;/h3&gt;

&lt;p&gt;You can find me on &lt;a href="https://www.linkedin.com/in/stefania-barabas" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; where I share updates about what’s next on &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;, as well as information about various tech events and other topics.&lt;/p&gt;

&lt;p&gt;You can learn more about Frontend Development, JavaScript, Typescript, React, Next and Node.js in my newsletter: &lt;a href="https://stefsdevnotes.substack.com/" rel="noopener noreferrer"&gt;Stef’s Dev Notes&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>githubcopilot</category>
      <category>programming</category>
    </item>
    <item>
      <title>Server-Side Rendering vs. Static Site Generation in the Modern Web</title>
      <dc:creator>Stefania Barabas</dc:creator>
      <pubDate>Thu, 16 Jan 2025 08:39:44 +0000</pubDate>
      <link>https://dev.to/stefania_barabas/server-side-rendering-vs-static-site-generation-in-the-modern-web-lgb</link>
      <guid>https://dev.to/stefania_barabas/server-side-rendering-vs-static-site-generation-in-the-modern-web-lgb</guid>
      <description>&lt;p&gt;Hello everyone, 🤗&lt;/p&gt;

&lt;p&gt;Today, I’ll delve into Server-Side Rendering (SSR) and Static Site Generation (SSG) in Next.js. These concepts presented a significant learning curve for me, but through lots of hands-on experience and numerous side projects, I’ve finally grasped some of their core principles.&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%2Fxj7ce72cnj2cih460ojf.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%2Fxj7ce72cnj2cih460ojf.png" alt="Image description" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As web development progresses, choosing between SSR and SSG can be essential for building efficient and scalable applications. Frameworks like React and Next.js provide excellent support for both, each with its own strengths.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Server-Side Rendering (SSR)?
&lt;/h3&gt;

&lt;p&gt;Server-Side Rendering generates HTML for a page on the server at runtime, based on the user’s request. This ensures that the user receives a fully rendered page upon loading, improving SEO and providing faster Time to First Byte (TTFB) compared to traditional client-side rendering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Benefits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Content:&lt;/strong&gt; Ideal for pages that require frequently updated or personalized data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SEO Optimization:&lt;/strong&gt; Search engines can crawl fully rendered pages easily.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example in Next.js (app directory, v13 and later):&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 { getTeamMembers } from '@/app/api/strapi';
import TeamMemberCard from '@/components/team-member-card';
import React from 'react'

const Team = async () =&amp;gt; {
  const teamMembers = await getTeamMembers()

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1 className='text-xl font-semibold mb-4'&amp;gt;Our Team&amp;lt;/h1&amp;gt;
      &amp;lt;div className='grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8'&amp;gt;
        {teamMembers.data.map((member: TeamMemberProps) =&amp;gt; (
          &amp;lt;TeamMemberCard key={member.documentId} {...member}/&amp;gt;
        ))}
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}

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

&lt;/div&gt;



&lt;p&gt;In this example, teamMembers is fetched server-side using the new app directory features and passed to the component.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Downsides of SSR:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Slower Initial Load Time:&lt;/strong&gt; Each request to the server requires rendering the page on the fly, which can introduce latency, especially if the server is slow or under heavy load.&lt;/li&gt;
&lt;li&gt;Higher Server Load: Since the server generates the page on each request, it can become a bottleneck. High traffic can result in performance degradation or even downtime if the server can’t handle the load.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Less Caching Efficiency:&lt;/strong&gt; While caching strategies can help mitigate performance issues, SSR doesn’t benefit from the same level of optimization as SSG, where pages can be cached at the CDN level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management Challenges:&lt;/strong&gt; Managing server-side state (especially when interacting with databases or APIs) can become more complex with SSR, and it may involve additional synchronization between the server and client.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is Static Site Generation (SSG)?
&lt;/h3&gt;

&lt;p&gt;Static Site Generation creates HTML at build time, producing static files that can be served by a Content Delivery Network (CDN). This approach is highly performant for pages where content does not change frequently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Benefits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Speed&lt;/strong&gt;: Pre-rendered pages ensure ultra-fast load times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; Static files can handle high traffic with minimal server resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example in Next.js (app directory, v13 and later):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { getTeamMemberDetails, getTeamMembers } from '@/app/api/strapi';
import { BlockRenderer } from '@/components/blocks';

export const generateStaticParamas = async () =&amp;gt; {
    const teamMembers = await getTeamMembers()
    if (!teamMembers) return [];
    return teamMembers.map((item: TeamMember) =&amp;gt; ({ slug: item.slug }));
}

const TeamMember = async ({ params }: {params: Promise&amp;lt;{ slug: string }&amp;gt; }) =&amp;gt; {
  const slug = (await params).slug

  if(!slug) return &amp;lt;p&amp;gt;No member found&amp;lt;/p&amp;gt;
  const teamMember = await getTeamMemberDetails(slug)

  if (!teamMember) return &amp;lt;p&amp;gt;No member found&amp;lt;/p&amp;gt;;

  return (
      &amp;lt;div className='bg-gray-200 container mx-auto w-full rounded-xl py-7 px-8 m-6'&amp;gt;
        {teamMember.blocks?.map((block: TeamPageBlock) =&amp;gt; (
          &amp;lt;BlockRenderer key={block.__component} block={block}/&amp;gt;
        ))}
      &amp;lt;/div&amp;gt;
  )
}

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

&lt;/div&gt;



&lt;p&gt;Here’s a brief explanation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;generateStaticParams&lt;/code&gt;: This function fetches the list of team members and returns an array of parameters (slugs) that will be used to generate static pages for each team member, while the component fetches the details of a team member based on the slug and renders the content. Since it uses &lt;code&gt;generateStaticParams&lt;/code&gt;, it will be statically generated at build time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This setup ensures that the pages for each team member are pre-rendered and served as static HTML, which is the essence of SSG.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Downsides of SSG:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Longer Build Times:&lt;/strong&gt; For large sites with a high number of pages, generating static pages can be time-consuming. This can lead to delays during deployment, especially if the content updates frequently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited to Non-Dynamic Content:&lt;/strong&gt; SSG is best suited for content that doesn’t change often or requires real-time interaction. Dynamic content is challenging to integrate and may require additional workarounds like client-side JavaScript or hybrid approaches (e.g., ISR).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stale Content:&lt;/strong&gt; Static pages are generated at build time, which means any content updates won’t reflect until the next build and deployment. This can be problematic if the website relies on real-time or frequently changing data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Difficult to Handle User-Specific Content:&lt;/strong&gt; If your application requires personalized content (like user dashboards, authenticated areas, etc.), SSG is less ideal, since static pages aren’t tailored to individual users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependency on CDNs:&lt;/strong&gt; SSG relies heavily on CDNs for delivering static content efficiently. If there’s an issue with the CDN, the site might experience downtime or slowdowns.&lt;/li&gt;
&lt;li&gt;Choosing Between SSR and SSG&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Use SSR when:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Content changes frequently and must be personalized.&lt;/li&gt;
&lt;li&gt;SEO is critical, and the data needs to be up-to-date.&lt;/li&gt;
&lt;li&gt;Example: E-commerce product pages with real-time inventory.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Use SSG when:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Content is largely static or updated at predictable intervals.&lt;/li&gt;
&lt;li&gt;Scalability and performance are top priorities.&lt;/li&gt;
&lt;li&gt;Example: Marketing websites or blogs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Hybrid Approaches
&lt;/h3&gt;

&lt;p&gt;Next.js also supports hybrid rendering, allowing developers to combine SSR and SSG within the same application. For example, static generation can be used for blog pages, while server-side rendering is used for a user’s dashboard.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Understanding the strengths and limitations of SSR and SSG is essential for creating efficient web applications. By leveraging frameworks like Next.js, developers can choose the right approach — or even a hybrid one — to meet their application’s specific needs. This flexibility ensures both optimal performance and a seamless user experience.&lt;/p&gt;

&lt;p&gt;Until next time 👋,&lt;/p&gt;

&lt;p&gt;Stefania&lt;/p&gt;

&lt;p&gt;P.S. Don’t forget to like, comment, and share with others if you found this helpful!&lt;/p&gt;

&lt;h3&gt;
  
  
  👋 Get in touch
&lt;/h3&gt;

&lt;p&gt;You can find me on &lt;a href="https://www.linkedin.com/in/stefania-barabas" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can learn more about Frontend Development, JavaScript, Typescript, React, Next and Node.js in my newsletter: &lt;a href="//stefsdevnotes.substack.com"&gt;Stef’s Dev Notes&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>nextjs</category>
      <category>typescript</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
