<?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: Code Rifki</title>
    <description>The latest articles on DEV Community by Code Rifki (@coderifki).</description>
    <link>https://dev.to/coderifki</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2628893%2F7da15f50-fe99-44ab-980c-546bab5b6acd.png</url>
      <title>DEV Community: Code Rifki</title>
      <link>https://dev.to/coderifki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/coderifki"/>
    <language>en</language>
    <item>
      <title>Next.js Is Amazing. So Why Did I Leave?</title>
      <dc:creator>Code Rifki</dc:creator>
      <pubDate>Sat, 10 Oct 2026 07:54:20 +0000</pubDate>
      <link>https://dev.to/coderifki/nextjs-is-amazing-so-why-did-i-leave-8n9</link>
      <guid>https://dev.to/coderifki/nextjs-is-amazing-so-why-did-i-leave-8n9</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Why I Loved Next.js&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Next.js&lt;/strong&gt; is an amazing framework for building modern web applications. I used it for different projects because it provides routing, server rendering, API capabilities, image optimization, and excellent React integration.&lt;/p&gt;

&lt;p&gt;At first, everything felt convenient. A lot of functionality was already built into the framework, so I didn't need to configure everything from scratch.&lt;/p&gt;

&lt;p&gt;But after working with it more seriously, I started noticing some things that didn't work well for my development style.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why I Decided to Leave&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. It Started Feeling Too Complex&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My biggest reason was complexity.&lt;/p&gt;

&lt;p&gt;As my projects became more advanced, I had to think about Server Components, Client Components, rendering strategies, caching, server actions, and other framework-specific concepts.&lt;/p&gt;

&lt;p&gt;These features are powerful, but sometimes I simply wanted to build something without having to think about so many layers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Caching Behavior Was Confusing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another issue was caching.&lt;/p&gt;

&lt;p&gt;Next.js provides powerful caching and rendering features, but understanding exactly when data is cached, revalidated, or rendered again can sometimes be confusing.&lt;/p&gt;

&lt;p&gt;I occasionally found myself asking: “Why am I still seeing this old data?”&lt;/p&gt;

&lt;p&gt;Instead of focusing on the actual application, I sometimes had to spend time figuring out what Next.js was doing behind the scenes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Too Much Framework Magic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was probably the most frustrating part for me.&lt;/p&gt;

&lt;p&gt;Next.js can automatically handle many things, which sounds great. But sometimes that convenience feels like magic.&lt;/p&gt;

&lt;p&gt;When something doesn't behave as expected, I want to clearly understand what is happening underneath. With Next.js, some behavior can feel hidden behind framework conventions.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Does That Mean Next.js Is Bad?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Absolutely not.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I still think Next.js is an excellent framework. It can be a great choice for large applications, content-heavy websites, and projects that benefit from server-side rendering and modern React features.&lt;/p&gt;

&lt;p&gt;Leaving it doesn't mean I think Next.js is bad. It simply means I realized that its trade-offs don't always match the way I want to build applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practical Alternatives
&lt;/h3&gt;

&lt;p&gt;If you feel the same way, you don't necessarily need to abandon React. One practical approach is to use React with a simpler build tool when you primarily need a client-side application.&lt;/p&gt;

&lt;p&gt;For projects that need server-side rendering but less framework complexity, consider evaluating alternatives such as &lt;strong&gt;Astro, Remix, React-Router, Tanstack Start&lt;/strong&gt; or other React-based frameworks.&lt;/p&gt;

&lt;p&gt;Another option is to keep your architecture deliberately simple: use a straightforward API, choose an explicit caching strategy, and avoid adding framework features unless the project actually needs them.&lt;/p&gt;

&lt;p&gt;The goal isn't to find a "better Next.js." It's to find a stack where you understand what is happening and can work comfortably with it.&lt;/p&gt;

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

&lt;p&gt;Next.js is amazing, but it isn't perfect for everyone. For me, the combination of complexity, caching behavior, and framework magic eventually became frustrating enough to explore other options.&lt;/p&gt;

&lt;p&gt;That doesn't make Next.js a bad framework. It simply taught me an important lesson: the best technology isn't always the one with the most features—it's the one that makes your work easier.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Hydration Errors in Next.js: What They Are and How to Fix Them</title>
      <dc:creator>Code Rifki</dc:creator>
      <pubDate>Sat, 10 Oct 2026 07:43:21 +0000</pubDate>
      <link>https://dev.to/coderifki/hydration-errors-in-nextjs-what-they-are-and-how-to-fix-them-1cjb</link>
      <guid>https://dev.to/coderifki/hydration-errors-in-nextjs-what-they-are-and-how-to-fix-them-1cjb</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;What Is a Hydration Error?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A hydration error in Next.js happens when the HTML generated on the server doesn't match what React expects when it runs in the browser.&lt;/p&gt;

&lt;p&gt;Think of it like two people creating the same puzzle but placing a few pieces differently. React notices the mismatch and may display a hydration warning or error.&lt;/p&gt;

&lt;p&gt;Common causes include using browser-only APIs such as window or &lt;code&gt;localStorage&lt;/code&gt;during rendering, generating random values, displaying different content based on the current time, or rendering different HTML on the server and client.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How to Fix Hydration Errors&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;First, check whether your component produces different output between server and client. Avoid using window, document, or &lt;code&gt;localStorage&lt;/code&gt;directly during the initial render.&lt;/p&gt;

&lt;p&gt;For browser-dependent logic, use &lt;code&gt;useEffect&lt;/code&gt;inside a Client Component when appropriate. Also make sure your HTML structure is valid and avoid unnecessary conditional rendering based on browser state.&lt;/p&gt;

&lt;p&gt;If you're using third-party libraries, check whether they expect to run only in the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step-by-Step Debugging Process&lt;/strong&gt;
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Step 1: Read the Error Message
&lt;/h4&gt;

&lt;p&gt;Start with the browser console and Next.js development overlay. Look for the component or element mentioned in the hydration warning. This gives you a useful starting point instead of debugging the entire application.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Find Dynamic Content
&lt;/h4&gt;

&lt;p&gt;Search the affected component for values that can change between renders, such as &lt;code&gt;Date.now()&lt;/code&gt;, &lt;code&gt;Math.random()&lt;/code&gt;, generated IDs, or time-dependent content.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3: Check Browser-Only APIs
&lt;/h4&gt;

&lt;p&gt;Look for window, document, &lt;code&gt;localStorage&lt;/code&gt;, and &lt;code&gt;sessionStorage&lt;/code&gt;. If they're accessed while rendering, move that logic to a client-side effect or another appropriate client-only solution.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4: Compare Server and Client Output
&lt;/h4&gt;

&lt;p&gt;Ask yourself: Would this component render exactly the same HTML on the server and in the browser? Check conditional logic that depends on browser state, screen size, cookies, or other client-only information.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 5: Check HTML Structure
&lt;/h4&gt;

&lt;p&gt;Invalid HTML nesting can also trigger hydration problems. Make sure elements are properly nested and that interactive elements aren't incorrectly placed inside one another.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 6: Test Third-Party Libraries
&lt;/h4&gt;

&lt;p&gt;Temporarily remove suspicious third-party components. If the error disappears, check whether the library supports server-side rendering or requires client-only initialization.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 7: Rebuild and Test Again
&lt;/h4&gt;

&lt;p&gt;After fixing the suspected cause, restart your development server and test the affected page again. A clean rebuild can also help confirm that the mismatch has actually been resolved.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Troubleshooting Tips&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Keep the initial server and client render deterministic.&lt;/li&gt;
&lt;li&gt;Avoid random or time-dependent values during rendering.&lt;/li&gt;
&lt;li&gt;Don't access browser APIs directly during server rendering.&lt;/li&gt;
&lt;li&gt;Use Client Components only when client-side functionality is required.&lt;/li&gt;
&lt;li&gt;Validate your HTML structure.&lt;/li&gt;
&lt;li&gt;Test third-party components individually.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Hydration errors in Next.js usually come from differences between server-rendered HTML and client-rendered content. By following a systematic debugging process—checking the error, dynamic values, browser APIs, HTML structure, and third-party libraries—you can identify the cause much faster. Keep your initial render consistent, and your Next.js application will be more reliable and easier to debu&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>REST API vs GraphQL: What's the Difference?</title>
      <dc:creator>Code Rifki</dc:creator>
      <pubDate>Sat, 03 Oct 2026 05:33:38 +0000</pubDate>
      <link>https://dev.to/coderifki/rest-api-vs-graphql-whats-the-difference-5gkf</link>
      <guid>https://dev.to/coderifki/rest-api-vs-graphql-whats-the-difference-5gkf</guid>
      <description>&lt;h2&gt;
  
  
  What Is REST API?
&lt;/h2&gt;

&lt;p&gt;REST API is a popular approach for building communication between applications. It uses HTTP methods such as &lt;code&gt;GET&lt;/code&gt;, &lt;code&gt;POST&lt;/code&gt;, &lt;code&gt;PUT&lt;/code&gt;, and &lt;code&gt;DELETE&lt;/code&gt;to work with resources.&lt;/p&gt;

&lt;p&gt;For example, an endpoint like &lt;code&gt;/api/products&lt;/code&gt; might return a list of products. REST is straightforward, widely supported, and relatively easy for beginners to understand.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What Is GraphQL?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;**GraphQL **is an API query language that lets clients request exactly the data they need. Instead of calling multiple endpoints, a client can often use a single GraphQL endpoint and specify the required fields.&lt;/p&gt;

&lt;p&gt;This can be useful for applications with complex data requirements, especially when different screens need different combinations of information.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;REST vs GraphQL: Which Should You Use?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;REST can be a practical choice for simple APIs, traditional CRUD applications, and systems with clearly defined resources. GraphQL can be useful when clients need flexible queries or when data comes from multiple related resources.&lt;/p&gt;

&lt;p&gt;Neither approach is universally better. The right choice depends on your application's requirements, team experience, and API architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  FAQs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Is GraphQL faster than REST?&lt;/strong&gt;&lt;br&gt;
Not necessarily. Performance depends on factors such as database queries, caching, network requests, and server implementation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can REST and GraphQL be used together?&lt;/strong&gt;&lt;br&gt;
Yes. An application can use REST for some services while using GraphQL for other parts of its architecture.&lt;/p&gt;

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

&lt;p&gt;The difference between &lt;strong&gt;REST API&lt;/strong&gt; and &lt;strong&gt;GraphQL&lt;/strong&gt; mainly comes down to how clients request and receive data. REST uses resource-based endpoints, while GraphQL allows clients to define the data they need. Choose the approach that fits your application's complexity, data requirements, and development workflow.&lt;/p&gt;

</description>
      <category>restapi</category>
      <category>programming</category>
      <category>graphql</category>
      <category>fullstack</category>
    </item>
    <item>
      <title>Common Next.js Mistakes Beginners Make (and How to Avoid Them)</title>
      <dc:creator>Code Rifki</dc:creator>
      <pubDate>Sat, 03 Oct 2026 04:52:52 +0000</pubDate>
      <link>https://dev.to/coderifki/common-nextjs-mistakes-beginners-make-and-how-to-avoid-them-5fn3</link>
      <guid>https://dev.to/coderifki/common-nextjs-mistakes-beginners-make-and-how-to-avoid-them-5fn3</guid>
      <description>&lt;h3&gt;
  
  
  1. Using "use client" Everywhere
&lt;/h3&gt;

&lt;p&gt;One common mistake beginners make in Next.js is adding &lt;code&gt;"use client"&lt;/code&gt; to almost every component. While Client Components are useful for interactivity, unnecessary usage can increase the amount of JavaScript sent to the browser.&lt;/p&gt;

&lt;p&gt;Start with Server Components and use &lt;code&gt;"use client"&lt;/code&gt; only when you need browser-side features such as state, event handlers, or effects.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Ignoring Next.js Image Optimization
&lt;/h3&gt;

&lt;p&gt;Using regular &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; elements everywhere can mean missing out on features provided by the Next.js &lt;code&gt;Image&lt;/code&gt; component. For many projects, &lt;code&gt;next/image&lt;/code&gt; can help optimize image loading and improve performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Fetching Data in the Wrong Place
&lt;/h3&gt;

&lt;p&gt;Beginners sometimes fetch data inside Client Components when the data could be retrieved on the server. With the App Router, consider fetching data in Server Components when client-side interaction isn't required.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Creating Huge Components
&lt;/h3&gt;

&lt;p&gt;Putting an entire page into one massive component makes your code difficult to maintain. Break reusable sections into smaller components with clear responsibilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Should beginners always use Server Components?&lt;/strong&gt;&lt;br&gt;
Not always. Use Server Components by default, then switch to Client Components when interactive browser functionality is needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is &lt;code&gt;"use client"&lt;/code&gt; bad?&lt;/strong&gt;&lt;br&gt;
No. It is an important Next.js feature. The problem is using it when the component doesn't actually need client-side functionality.&lt;/p&gt;

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

&lt;p&gt;Avoiding common Next.js mistakes can make your applications easier to maintain and improve performance. Focus on understanding Server and Client Components, data fetching, image optimization, and component structure. Start applying these practices to your next Next.js project and build better habits from the beginning.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>nextjs</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Understanding the Next.js App Router in 5 Minutes</title>
      <dc:creator>Code Rifki</dc:creator>
      <pubDate>Sat, 03 Oct 2026 04:33:50 +0000</pubDate>
      <link>https://dev.to/coderifki/understanding-the-nextjs-app-router-in-5-minutes-cgc</link>
      <guid>https://dev.to/coderifki/understanding-the-nextjs-app-router-in-5-minutes-cgc</guid>
      <description>&lt;h2&gt;
  
  
  What Is the Next.js App Router?
&lt;/h2&gt;

&lt;p&gt;The Next.js App Router is the modern routing system introduced in Next.js, built around React Server Components. Instead of keeping all routes in one configuration file, you create routes using folders and special files inside the &lt;code&gt;app&lt;/code&gt;directory.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;app/about/page.tsx&lt;/code&gt; automatically creates the &lt;code&gt;/about&lt;/code&gt; route. Simple, right?&lt;/p&gt;

&lt;p&gt;The App Router also provides built-in support for layouts, loading states, error handling, and dynamic routes, making it easier to organize larger applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Does the App Router Work?
&lt;/h3&gt;

&lt;p&gt;The basic structure is straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;app/page.tsx&lt;/code&gt; → Homepage&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;app/about/page.tsx&lt;/code&gt; → About page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;app/blog/[slug]/page.tsx&lt;/code&gt; → Dynamic blog page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;app/layout.tsx&lt;/code&gt; → Shared layout&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By default, components inside the App Router are Server Components. You can use "use client" when a component needs browser-side interactivity, such as state or event handlers.&lt;/p&gt;

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

&lt;p&gt;The Next.js App Router gives you a structured way to build modern React applications with routing, layouts, data fetching, and Server Components. Start with the app directory and learn its core files first. Build a small project and experiment with nested and dynamic routes to get comfortable quickly.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>approuter</category>
      <category>programming</category>
    </item>
    <item>
      <title>Server Components vs Client Components: When to Use Which</title>
      <dc:creator>Code Rifki</dc:creator>
      <pubDate>Fri, 02 Oct 2026 12:36:27 +0000</pubDate>
      <link>https://dev.to/coderifki/server-components-vs-client-components-when-to-use-which-2154</link>
      <guid>https://dev.to/coderifki/server-components-vs-client-components-when-to-use-which-2154</guid>
      <description>&lt;h2&gt;
  
  
  Understanding Server and Client Components
&lt;/h2&gt;

&lt;p&gt;If you're building with Next.js, you’ll quickly encounter Server Components and Client Components. But which one should you use?&lt;/p&gt;

&lt;p&gt;Server Components run on the server and are ideal for fetching data, accessing databases, and keeping sensitive logic away from the browser. They can also help reduce the amount of JavaScript sent to users.&lt;/p&gt;

&lt;p&gt;Client Components, marked with &lt;code&gt;use client&lt;/code&gt;, run in the browser. Use them when your component needs interactivity, such as state, event handlers, forms, or browser APIs.&lt;/p&gt;

&lt;p&gt;Think of Server Components as your application's backend kitchen, while Client Components are the part customers interact with directly.&lt;/p&gt;

&lt;h3&gt;
  
  
  When Should You Use Each?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Choose Server Components&lt;/strong&gt; for static content, data fetching, authentication checks, and database operations. Choose Client Components for interactive UI elements like dropdowns, modals, counters, and dynamic forms.&lt;/p&gt;

&lt;h3&gt;
  
  
  FAQs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Can Server Components use &lt;code&gt;"useState"&lt;/code&gt;?&lt;/strong&gt;&lt;br&gt;
No. React hooks that require browser-side interaction, such as &lt;code&gt;useState&lt;/code&gt;and &lt;code&gt;useEffect&lt;/code&gt;, belong in Client Components.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should every component use &lt;code&gt;"use client"&lt;/code&gt;?&lt;/strong&gt;&lt;br&gt;
No. Add it only where client-side functionality is actually required.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>ssr</category>
      <category>csr</category>
    </item>
    <item>
      <title>The Difference Between SPA and PWA</title>
      <dc:creator>Code Rifki</dc:creator>
      <pubDate>Fri, 02 Oct 2026 12:06:24 +0000</pubDate>
      <link>https://dev.to/coderifki/the-difference-between-spa-and-pwa-3mnf</link>
      <guid>https://dev.to/coderifki/the-difference-between-spa-and-pwa-3mnf</guid>
      <description>&lt;p&gt;When building modern web applications, you may come across the terms SPA (Single Page Application) and PWA (Progressive Web App). Although they are often mentioned together, they are actually different concepts.&lt;/p&gt;

&lt;p&gt;A SPA focuses on how an application works, while a PWA focuses on improving the web experience with features such as offline support, installation, and caching.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a SPA?
&lt;/h2&gt;

&lt;p&gt;A Single Page Application (SPA) is a web application that loads a main page and dynamically updates its content without requiring a full page reload.&lt;/p&gt;

&lt;p&gt;Frameworks and libraries such as React, Vue, and Angular are commonly used to build SPAs.&lt;/p&gt;

&lt;p&gt;For example, when a user moves from a dashboard to a settings page, a SPA can update the interface without completely reloading the browser.&lt;/p&gt;

&lt;p&gt;This can make applications feel faster and smoother, especially for interactive applications such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Admin dashboards&lt;/li&gt;
&lt;li&gt;SaaS applications&lt;/li&gt;
&lt;li&gt;Project management tools&lt;/li&gt;
&lt;li&gt;Web-based applications&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Is a PWA?
&lt;/h2&gt;

&lt;p&gt;A Progressive Web App (PWA) is a web application that uses modern browser features to provide a more app-like experience.&lt;/p&gt;

&lt;p&gt;A PWA can provide features such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offline support&lt;/li&gt;
&lt;li&gt;Installability&lt;/li&gt;
&lt;li&gt;Caching&lt;/li&gt;
&lt;li&gt;Push notifications&lt;/li&gt;
&lt;li&gt;App-like navigation and behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PWAs commonly use technologies such as service workers and a web app manifest.&lt;/p&gt;

&lt;p&gt;Unlike a native mobile application, users can access a PWA directly through a web browser.&lt;/p&gt;

&lt;p&gt;A SPA does not automatically become a PWA.&lt;/p&gt;

&lt;p&gt;Likewise, a PWA does not have to be a SPA.&lt;/p&gt;

&lt;p&gt;However, developers can combine both approaches.&lt;/p&gt;

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

&lt;p&gt;The difference between SPA and PWA is mainly about their purpose. A SPA focuses on application architecture and dynamic navigation, while a PWA focuses on enhancing a web application with modern browser capabilities.&lt;/p&gt;

&lt;p&gt;They are not competing technologies. A single web application can be both a SPA and a PWA, depending on its requirements.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Variables in TypeScript</title>
      <dc:creator>Code Rifki</dc:creator>
      <pubDate>Thu, 10 Sep 2026 08:08:50 +0000</pubDate>
      <link>https://dev.to/coderifki/variables-in-typescript-4hj7</link>
      <guid>https://dev.to/coderifki/variables-in-typescript-4hj7</guid>
      <description>&lt;p&gt;Variables are one of the most basic building blocks of any TypeScript program. They allow you to store information such as names, numbers, user data, and application settings. If you're familiar with JavaScript, you'll find TypeScript variables very familiar, but TypeScript gives you an extra layer of type safety.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Declare Variables in TypeScript
&lt;/h2&gt;

&lt;p&gt;TypeScript uses the same let, const, and var keywords as JavaScript. However, you can specify the expected data type using a colon (:).&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;isActive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;username&lt;/code&gt; must contain a string, &lt;code&gt;age&lt;/code&gt; must contain a number, and &lt;code&gt;isActive&lt;/code&gt; must contain a boolean value. If you accidentally assign the wrong type, TypeScript can warn you before the application runs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;In modern TypeScript development, &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; are generally preferred over &lt;code&gt;var&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;let&lt;/code&gt; when the value needs to change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use &lt;code&gt;const&lt;/code&gt; when the value should not be reassigned:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;website&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;My Website&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>typescript</category>
    </item>
    <item>
      <title>What Is TypeScript?</title>
      <dc:creator>Code Rifki</dc:creator>
      <pubDate>Thu, 10 Sep 2026 08:02:32 +0000</pubDate>
      <link>https://dev.to/coderifki/what-is-typescript-39kk</link>
      <guid>https://dev.to/coderifki/what-is-typescript-39kk</guid>
      <description>&lt;p&gt;TypeScript is a programming language developed by Microsoft that builds on JavaScript by adding static typing and other development features. Think of it as JavaScript with an extra safety net, it helps developers catch potential errors before their code runs.&lt;/p&gt;

&lt;p&gt;Unlike JavaScript, TypeScript allows you to define the type of data a variable, function, or object should contain. This can make large applications easier to maintain, especially when multiple developers are working on the same project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Should You Use TypeScript?
&lt;/h2&gt;

&lt;p&gt;One of the biggest advantages of TypeScript is improved code reliability. Your editor can detect many mistakes while you're writing code, saving you from discovering them later in the browser.&lt;/p&gt;

&lt;p&gt;TypeScript also provides better autocomplete, clearer documentation, and easier refactoring. It works especially well with modern frameworks such as React, Next.js, and Node.js.&lt;/p&gt;

</description>
      <category>typescript</category>
    </item>
  </channel>
</rss>
