<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nader Dweik on Medium]]></title>
        <description><![CDATA[Stories by Nader Dweik on Medium]]></description>
        <link>https://medium.com/@nderdweik?source=rss-726189d9815f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pfe_RFpdRAC7mJfo</url>
            <title>Stories by Nader Dweik on Medium</title>
            <link>https://medium.com/@nderdweik?source=rss-726189d9815f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:54:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nderdweik/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Storybook 9 Dark Mode: Complete Setup Guide with @storybook/addon-themes]]></title>
            <link>https://medium.com/@nderdweik/storybook-9-dark-mode-complete-setup-guide-with-storybook-addon-themes-1dfd735e7a5d?source=rss-726189d9815f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1dfd735e7a5d</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[dark-mode]]></category>
            <category><![CDATA[storybook]]></category>
            <category><![CDATA[storybook-by-react]]></category>
            <dc:creator><![CDATA[Nader Dweik]]></dc:creator>
            <pubDate>Wed, 01 Oct 2025 14:11:51 GMT</pubDate>
            <atom:updated>2025-10-01T14:11:51.484Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YG21wGs5KkUWqPT0.png" /></figure><h3>Dark/Light Theme Control in Storybook 9</h3><p>Adding theme switching capabilities to your Storybook setup is essential for testing components in both light and dark modes. With Storybook 9, the process has been streamlined through the official @storybook/addon-themes package. This guide walks you through the complete setup process.</p><h3>Why Theme Control Matters</h3><p>Before diving into the implementation, it’s worth understanding why theme control in Storybook is crucial. As modern applications increasingly support multiple themes, developers need a way to visualize and test their components across different color schemes without constantly switching contexts. A properly configured Storybook theme controller provides instant visual feedback and catches theme-related issues early in development.</p><h3>Prerequisites</h3><p>Before starting, ensure you have:</p><ul><li>Storybook 9 installed and configured</li><li>A project with existing theme styles (CSS variables or classes)</li><li>Basic familiarity with Storybook configuration files</li></ul><h3>Step 1: Install the Required Package</h3><p>The first step is installing the official themes addon. Open your terminal and run:</p><pre>npm install -D @storybook/addon-themes</pre><h3>Important: Remove Legacy Addons</h3><p>If you previously used storybook-dark-mode (common in Storybook 6 and 7), you&#39;ll need to remove it as it&#39;s incompatible with Storybook 9:</p><pre>npm uninstall storybook-dark-mode</pre><p>The @storybook/addon-themes package is the official, maintained solution for Storybook 9 and offers better integration with the latest features.</p><h3>Step 2: Configure Your Main Configuration File</h3><p>Navigate to .storybook/main.ts and add the themes addon to your addons array:</p><pre>import type { StorybookConfig } from &#39;@storybook/react-vite&#39;;</pre><pre>const config: StorybookConfig = {<br>  stories: [<br>    &quot;../src/**/*.mdx&quot;,<br>    &quot;../src/**/*.stories.@(js|jsx|mjs|ts|tsx)&quot;<br>  ],<br>  addons: [<br>    &quot;@chromatic-com/storybook&quot;,<br>    &quot;@storybook/addon-docs&quot;,<br>    &quot;@storybook/addon-onboarding&quot;,<br>    &quot;@storybook/addon-a11y&quot;,<br>    &quot;@storybook/addon-vitest&quot;,<br>    &quot;@storybook/addon-themes&quot;  // Add this line<br>  ],<br>  framework: {<br>    &quot;name&quot;: &quot;@storybook/react-vite&quot;,<br>    &quot;options&quot;: {}<br>  }<br>};</pre><pre>export default config;</pre><p>This registers the addon with Storybook, making its decorators available for use in your preview configuration.</p><h3>Step 3: Configure the Theme Decorator</h3><p>The next step depends on how your project implements theming. The @storybook/addon-themes package provides different decorators for different CSS approaches.</p><h3>Option A: Using Data Attributes (Recommended)</h3><p>If your CSS uses data attributes for theming, this is the approach you’ll want. This pattern is common in modern CSS frameworks and design systems:</p><pre>/* Your CSS structure */<br>[data-theme=&quot;dark&quot;] {<br>  --background: 222.2 84% 4.9%;<br>  --foreground: 210 40% 98%;<br>  /* Other dark mode variables */<br>}</pre><p>Update .storybook/preview.ts with this configuration:</p><pre>import type { Preview } from &#39;@storybook/react-vite&#39;<br>import { withThemeByDataAttribute } from &#39;@storybook/addon-themes&#39;;<br>import &#39;../src/index.css&#39;;</pre><pre>const preview: Preview = {<br>  parameters: {<br>    controls: {<br>      matchers: {<br>        color: /(background|color)$/i,<br>        date: /Date$/i,<br>      },<br>    },<br>    a11y: {<br>      test: &#39;todo&#39;<br>    }<br>  },<br>  decorators: [<br>    withThemeByDataAttribute({<br>      themes: {<br>        light: &#39;light&#39;,<br>        dark: &#39;dark&#39;,<br>      },<br>      defaultTheme: &#39;light&#39;,<br>      attributeName: &#39;data-theme&#39;,<br>    }),<br>  ],<br>};</pre><pre>export default preview;</pre><h3>Option B: Using CSS Classes</h3><p>If your project uses class-based theming (common with Tailwind CSS), use this alternative configuration:</p><pre>/* Your CSS structure */<br>.dark {<br>  /* Dark mode styles */<br>}</pre><p>Update .storybook/preview.ts accordingly:</p><pre>import type { Preview } from &#39;@storybook/react-vite&#39;<br>import { withThemeByClassName } from &#39;@storybook/addon-themes&#39;;<br>import &#39;../src/index.css&#39;;</pre><pre>const preview: Preview = {<br>  parameters: {<br>    controls: {<br>      matchers: {<br>        color: /(background|color)$/i,<br>        date: /Date$/i,<br>      },<br>    },<br>  },<br>  decorators: [<br>    withThemeByClassName({<br>      themes: {<br>        light: &#39;&#39;,      // Empty string for light mode<br>        dark: &#39;dark&#39;,   // Applies &#39;dark&#39; class<br>      },<br>      defaultTheme: &#39;light&#39;,<br>    }),<br>  ],<br>};</pre><pre>export default preview;</pre><h3>Step 4: Verify Your CSS Theme Implementation</h3><p>Your CSS should already have theme styles defined. Here’s a typical structure using CSS custom properties:</p><pre>/* Light mode (default) */<br>:root {<br>  --background: 0 0% 100%;<br>  --foreground: 222.2 84% 4.9%;<br>  --card: 0 0% 100%;<br>  --card-foreground: 222.2 84% 4.9%;<br>  --primary: 222.2 47.4% 11.2%;<br>  /* Additional light mode variables */<br>}</pre><pre>/* Dark mode overrides */<br>[data-theme=&quot;dark&quot;] {<br>  --background: 222.2 84% 4.9%;<br>  --foreground: 210 40% 98%;<br>  --card: 222.2 84% 4.9%;<br>  --card-foreground: 210 40% 98%;<br>  --primary: 210 40% 98%;<br>  /* Additional dark mode variables */<br>}</pre><p>The decorator will automatically apply the appropriate attribute or class to toggle between these theme definitions.</p><h3>Step 5: Restart and Test</h3><p>After completing the configuration, restart your Storybook development server:</p><pre>npm run storybook</pre><p>Once Storybook reloads, you should see a new theme toggle button in the toolbar. Click it to switch between light and dark themes, and watch your components update in real-time.</p><h3>Troubleshooting Common Issues</h3><h3>Theme Toggle Not Appearing</h3><p>If the theme toggle doesn’t appear in your toolbar:</p><ul><li>Verify the addon is properly listed in main.ts</li><li>Check that you’ve imported the correct decorator in preview.ts</li><li>Ensure there are no TypeScript errors in your configuration files</li><li>Try clearing Storybook’s cache: npm run storybook -- --no-manager-cache</li></ul><h3>Themes Not Switching</h3><p>If the toggle appears but themes don’t switch:</p><ul><li>Confirm your attributeName or class names match your CSS exactly</li><li>Verify your CSS file is imported in preview.ts</li><li>Check browser DevTools to see if the attribute/class is being applied to the correct element</li><li>Ensure your CSS specificity isn’t being overridden</li></ul><h3>Inconsistent Theme Behavior</h3><p>If some components don’t respect the theme:</p><ul><li>Make sure all components use CSS custom properties consistently</li><li>Check for hardcoded color values that bypass the theme system</li><li>Verify that component styles properly inherit from parent theme variables</li></ul><h3>Quick Reference Summary</h3><p><strong>Required Package:</strong></p><ul><li>@storybook/addon-themes</li></ul><p><strong>Configuration Files:</strong></p><ol><li>.storybook/main.ts - Add addon to the addons array</li><li>.storybook/preview.ts - Configure appropriate decorator</li><li>CSS files — Must have theme styles defined</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1dfd735e7a5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Left-to-Right to Right-to-Left: Frontend Best Practices]]></title>
            <link>https://medium.com/@nderdweik/from-left-to-right-to-right-to-left-frontend-best-practices-1a21aa2ce1d0?source=rss-726189d9815f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a21aa2ce1d0</guid>
            <category><![CDATA[direction]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[arabic]]></category>
            <category><![CDATA[right-to-left]]></category>
            <category><![CDATA[rtl-design]]></category>
            <dc:creator><![CDATA[Nader Dweik]]></dc:creator>
            <pubDate>Wed, 24 Sep 2025 08:46:17 GMT</pubDate>
            <atom:updated>2025-09-24T08:46:17.219Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering Right-to-Left (RTL) Layout in Frontend Development</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eZkQoizhOggUhmhc.jpg" /></figure><h3>What is RTL and Why Does It Matter?</h3><p>Right-to-Left (RTL) layout support is a crucial aspect of web developmentFrom Left-to-Right to Right-to-Left: Frontend Best Practices that enables websites and applications to properly display content for languages that are read from right to left, such as Arabic, Hebrew, Persian, and Urdu. With over 400 million people worldwide using RTL languages, implementing proper RTL support isn’t just about inclusivity , it’s about reaching a significant global audience.</p><p>RTL support goes beyond simply flipping text direction. It involves a complete transformation of the user interface, where navigation elements, layouts, icons, and even the flow of information need to be mirrored to create an intuitive experience for RTL language users.</p><h3>Understanding Layout Differences: LTR vs RTL</h3><p>The fundamental difference between Left-to-Right (LTR) and Right-to-Left (RTL) layouts extends far beyond text direction. When implementing RTL support, the entire visual hierarchy of your interface needs to be reconsidered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*PNE9ywIRx83Uj22m.png" /></figure><p>In an LTR layout, users naturally expect:</p><ul><li>Navigation to flow from left to right</li><li>Primary content on the left, secondary on the right</li><li>Progression indicators to move left to right</li><li>Form fields to align left</li></ul><p>RTL layouts require the opposite approach:</p><ul><li>Navigation flows from right to left</li><li>Primary content appears on the right side</li><li>Visual hierarchy follows right-to-left reading patterns</li><li>Form alignment and button placement are mirrored</li></ul><p>Think of it as creating a mirror image of your interface, but one that maintains logical flow and usability for RTL readers.</p><h3>Best Practices for RTL Implementation</h3><p>Modern CSS provides powerful logical properties that make RTL implementation much more straightforward than traditional approaches. Here’s how to implement RTL support effectively:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*wsdx4-ZPP4TI8mxjleCX-Q.png" /></figure><h3>Use Logical Properties</h3><p><strong>The Right Way:</strong></p><pre>.sidebar {<br>  margin-inline-start: 20px;<br>  padding-inline-end: 15px;<br>  border-inline-start: 2px solid #ccc;<br>}</pre><pre>.button {<br>  float: inline-start;<br>  text-align: start;<br>}</pre><p>Logical properties automatically adapt to the text direction without requiring separate RTL stylesheets or overrides. When direction: rtl is applied to the document or container, margin-inline-start becomes margin-right, and text-align: start becomes text-align: right.</p><h3>Set Direction Properly</h3><pre>html[dir=&quot;rtl&quot;] {<br>  direction: rtl;<br>}</pre><pre>/* Or for specific components */<br>.rtl-container {<br>  direction: rtl;<br>}</pre><h3>Use Flexible Positioning</h3><pre>.modal {<br>  inset-inline-start: 50px;<br>  transform: translateX(-50%);<br>}</pre><h3>What NOT to Do: Common RTL Mistakes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*WsyRS15I7dFX_Sjbhu8pSA.png" /></figure><p><strong>The Wrong Way:</strong></p><pre>.sidebar {<br>  margin-left: 20px;        /* ❌ Won&#39;t flip automatically */<br>  padding-right: 15px;      /* ❌ Needs manual override */<br>  border-left: 2px solid #ccc; /* ❌ Wrong side in RTL */<br>}</pre><pre>.button {<br>  float: left;              /* ❌ Must be overridden */<br>  text-align: left;         /* ❌ Hard-coded direction */<br>}</pre><pre>/* Then you&#39;d need this mess for RTL: */<br>[dir=&quot;rtl&quot;] .sidebar {<br>  margin-left: 0;<br>  margin-right: 20px;<br>  padding-right: 0;<br>  padding-left: 15px;<br>  border-left: none;<br>  border-right: 2px solid #ccc;<br>}</pre><p>This approach leads to:</p><ul><li>Duplicate CSS rules</li><li>Maintenance nightmares</li><li>Easy-to-miss styling bugs</li><li>Increased bundle size</li></ul><h3>Why Logical Properties Win</h3><p>The beauty of logical properties lies in their simplicity and maintainability. Instead of writing separate rules for RTL, your CSS adapts automatically based on the document’s direction. This means:</p><ol><li><strong>Single source of truth</strong>: One set of styles works for both directions</li><li><strong>Reduced complexity</strong>: No need for direction-specific overrides</li><li><strong>Better maintainability</strong>: Changes apply to both LTR and RTL automatically</li><li><strong>Smaller CSS bundles</strong>: No duplicate styling rules</li></ol><h3>Implementation Strategy</h3><ol><li><strong>Start with logical properties</strong> from the beginning of your project</li><li><strong>Set direction at the document level</strong> using dir=&quot;rtl&quot; on the &lt;html&gt; element</li><li><strong>Test early and often</strong> with actual RTL content</li><li><strong>Consider icon and image mirroring</strong> for directional elements</li><li><strong>Use CSS transforms</strong> for complex positioning that needs to flip</li></ol><h3>Conclusion</h3><p>Implementing RTL support doesn’t have to be an afterthought or a complex refactoring project. By adopting logical CSS properties and understanding the fundamental differences between LTR and RTL layouts, you can create truly inclusive web experiences that serve users regardless of their language’s reading direction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a21aa2ce1d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVA: The Secret to Lighter, Faster React Components]]></title>
            <link>https://medium.com/@nderdweik/cva-the-secret-to-lighter-faster-react-components-482ca514af6e?source=rss-726189d9815f------2</link>
            <guid isPermaLink="false">https://medium.com/p/482ca514af6e</guid>
            <category><![CDATA[class-variance-authority]]></category>
            <category><![CDATA[cva]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Nader Dweik]]></dc:creator>
            <pubDate>Mon, 22 Sep 2025 09:20:53 GMT</pubDate>
            <atom:updated>2025-09-22T09:20:53.353Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QgNk_v_eywhO7tXv" /></figure><h3>What is CVA?</h3><p><strong>Class Variance Authority (CVA)</strong> is a TypeScript-first utility for creating <strong>type-safe, variant-based components</strong>. It helps organize styles into variants, compound variants, and defaults — reducing bundle size and runtime cost.</p><p>Let me start by defining what is<strong> Tree Shaking </strong>means in react:</p><p>So basically tree shaking is the process that is part of js that the bundlers like webpack, rollup or vite, takes to remove the unused code from the application final bundle, which is very beneficial cuz it reduces the run time and the build time of our application, by reducing the bundle size and the load time of them.</p><h3>Current Approach: The Heavy Suitcase</h3><p>Our Input component imports <strong>all styles</strong>, even if you only need one:</p><blockquote><em>export const inputStyles = {</em></blockquote><blockquote><em>sizes: { xs: “…”, sm: “…”, md: “…” },</em></blockquote><blockquote><em>variants: { outlined: “…”, filled: “…”, underlined: “…” },</em></blockquote><blockquote><em>states: { disabled: “…”, error: “…”, success: “…” }</em></blockquote><blockquote><em>}</em></blockquote><p><strong>Usage:</strong></p><blockquote><em>&lt;Input variant=”outlined” inputSize=”md” /&gt;</em></blockquote><p>But our bundle still carries <strong>all sizes, all variants, all states</strong> = <strong>heavy luggage</strong>.</p><p><strong>And at runtime:</strong></p><blockquote><em>const getInputClasses = () =&gt; cn(</em></blockquote><blockquote><em>inputStyles.sizes[inputSize],</em></blockquote><blockquote><em>inputStyles.variants[variant],</em></blockquote><blockquote><em>inputStyles.states[state]</em></blockquote><blockquote><em>)</em></blockquote><p>This means <strong>string building + lookups on every render</strong>.</p><h3>With CVA: Smart Packing: Define styles once, organized and type-safe</h3><blockquote><em>import { cva } from “class-variance-authority”</em></blockquote><blockquote><em>const inputVariants = cva(“outline-none font-[‘Poppins’]”, {</em></blockquote><blockquote><em>variants: {</em></blockquote><blockquote><em>inputSize: { sm: “h-10 px-3”, md: “h-12 px-4” },</em></blockquote><blockquote><em>variant: { outlined: “border bg-white”, filled: “bg-gray-100” },</em></blockquote><blockquote><em>state: { error: “border-red-500”, disabled: “opacity-50” }</em></blockquote><blockquote><em>},</em></blockquote><blockquote><em>defaultVariants: { inputSize: “md”, variant: “outlined”, state: “default” }</em></blockquote><blockquote><em>})</em></blockquote><h4><strong>Usage:</strong></h4><blockquote><em>&lt;input className={inputVariants({ inputSize: “md”, variant: “outlined” })} /&gt;</em></blockquote><p>Now our bundle only includes the <strong>styles we use</strong> not the entire closet.</p><h3>Luggage Weight Difference</h3><h4><strong>Before CVA (Heavy Suitcase):</strong></h4><ul><li>Ships everything:</li><li>Runtime: string concatenation, lookups, conditionals</li></ul><h4><strong>With CVA (Light Suitcase)</strong></h4><ul><li>Ships only used styles:</li><li>Runtime: direct string lookup (fast)</li><li>~72% reduction in style-related bundle size</li></ul><h3>Why This Matters:</h3><p>Smaller bundle → faster load<br> Faster runtime → less string building<br> Easier maintenance → add variants in one place</p><p><strong>CVA turns your Input component from a messy, heavy closet into a smart, pre-packed travel kit.</strong></p><h3><strong>Mini Story to make it a step closer to fully understand why we need CVA:</strong></h3><p><strong>Meet Dana’s chaotic closet:</strong></p><ul><li>She has a <strong>giant function</strong> that grabs clothes for her</li></ul><h4>When she says “I need something blue and casual,” the function goes:</h4><ol><li>Grabs the ENTIRE blue section (even formal blue clothes)</li><li>Grabs the ENTIRE casual section (even non-blue casual clothes)</li><li>Grabs extra stuff “just in case”</li><li>Throws it all in the suitcase</li></ol><p><em>// Like Dana’s helper that grabs too much</em></p><blockquote><em>getBadgeClasses(variant, size, color) {</em></blockquote><p><em>// Grabs ALL the style options, even unused ones</em></p><blockquote><em>return combineAllStyles(allVariants, allSizes, allColors) </em>}</blockquote><p><strong>The Problem:</strong> Her suitcase is HEAVY because it’s full of clothes she’ll never wear!</p><h3>The New Way: The Smart CVA Closet</h3><p><strong>Meet Nader’s organized closet with a smart assistant (CVA):</strong></p><ul><li>Each outfit combination is <strong>pre-labeled</strong> and <strong>organized</strong></li></ul><h4>When Nader says “blue casual shirt”:</h4><ol><li>Goes directly to the “blue + casual” section</li><li>Grabs ONLY that specific combination</li><li>Leaves everything else behind</li></ol><p><em>// Like nader’s smart closet that grabs exactly what’s needed</em></p><blockquote><em>const outfitVariants = cva(“basic clothes”, {</em></blockquote><blockquote><em>variants: {</em></blockquote><blockquote><em>color: { blue: “blue-shirt”, red: “red-shirt” },</em></blockquote><blockquote><em>style: { casual: “t-shirt”, formal: “button-up” }</em></blockquote><blockquote><em>}</em></blockquote><blockquote><em>})</em></blockquote><blockquote><em>outfitVariants({ color: “blue”, style: “casual” })</em></blockquote><p><em>// Gets ONLY the blue casual t-shirt, nothing else!</em></p><p><strong>The Magic:</strong> His suitcase is LIGHT because he only packed exactly what he planned to wear!</p><h3>Why Nader Suitcase (Bundle) Is Lighter</h3><h3>1. Pre-organized System</h3><ul><li><strong>Nader closet:</strong> Everything is labeled and categorized upfront</li><li><strong>Your bundler:</strong> Can see exactly what code combinations exist and which ones you use</li></ul><h3>2. Smart Packing Assistant</h3><ul><li><strong>Nader CVA:</strong> Knows exactly which shelf to go to</li><li><strong>Tree-shaking:</strong> Knows exactly which code to include and what to leave behind</li></ul><h3>3. No “Just in Case” Items</h3><ul><li><strong>Nader:</strong> Only packs what’s on his itinerary</li><li><strong>CVA:</strong> Only includes the style combinations your app actually uses</li></ul><h3>4. Efficient Routes</h3><ul><li><strong>Nader CVA:</strong> Takes the shortest path to get what’s needed</li><li><strong>CVA:</strong> Pre-calculates the most efficient way to combine styles</li></ul><h3>The Real-World Impact</h3><p><em>// Dana’s approach (heavy suitcase/bundle)</em></p><blockquote><em>import { badgeStyles } from ‘./utils’</em></blockquote><blockquote><em>// Bundler includes: ALL variants × ALL sizes × ALL colors = </em><strong><em>HEAVY</em></strong></blockquote><blockquote><em>// Nadeer approach (light suitcase/bundle)</em></blockquote><blockquote><em>import { badgeVariants } from ‘./utils’</em></blockquote><blockquote><em>badgeVariants({ variant: ‘solid’, size: ‘md’ })</em></blockquote><blockquote><em>// Bundler includes: ONLY solid + md combination = </em><strong><em>LIGHT</em></strong></blockquote><p><strong>Conclusion:</strong> Nader apps load faster because his “suitcases” (JavaScript bundles) are lighter.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=482ca514af6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Server Components Made Me Rage Quit]]></title>
            <link>https://medium.com/@nderdweik/react-server-components-made-me-rage-quit-then-come-back-for-more-7e9f37a56ed6?source=rss-726189d9815f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e9f37a56ed6</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[rsc]]></category>
            <category><![CDATA[react-server-component]]></category>
            <dc:creator><![CDATA[Nader Dweik]]></dc:creator>
            <pubDate>Sun, 10 Aug 2025 08:34:09 GMT</pubDate>
            <atom:updated>2025-09-22T09:26:53.278Z</atom:updated>
            <content:encoded><![CDATA[<p>Two weeks ago, I thought I understood React. I’d been building React applications for months now, confidently explaining components to my friends &amp; developers. Then React Server Components entered my life, and suddenly I felt like I was learning JavaScript for the first time again.</p><p>If you’ve touched RSCs and walked away more confused than when you started, you’re not alone. The React team introduced a paradigm so fundamentally different that it’s breaking the mental models we’ve spent years building.</p><h3>The Mental Model Crisis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mGmImnl1SsVLI1XA.png" /></figure><p>Traditional React taught us a simple rule: components are functions that return JSX, they run in the browser, and they can have state. React Server Components threw that rulebook out the window.</p><p>Now we have components that run on the server, components that can’t use state, and we’re juggling two different JavaScript environments. The confusion is real and universal.</p><h3>What Actually Are React Server Components?</h3><p>Let’s start with what they’re NOT:</p><p>❌ <strong>They’re not server-side rendering (SSR)</strong><br> ❌ <strong>They’re not static site generation (SSG)</strong><br> ❌ <strong>They’re not just “components that fetch data”</strong></p><p>RSCs are <strong>components that render to a special format on the server and get streamed to the client as a serialized representation</strong>, not HTML. Think of it like sending a recipe instead of a cooked meal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*J09zp5210o-0beFQQjcYQw.png" /></figure><h3>The Two Worlds Problem</h3><p>You’re not building one application — you’re building two that communicate:</p><h3>Server World</h3><ul><li>Direct database access, file systems, server APIs</li><li>No browser APIs, state, or effects</li><li>Perfect for data fetching and initial rendering</li></ul><h3>Client World</h3><ul><li>Browser APIs, state, effects</li><li>Can’t directly access server resources</li><li>Perfect for interactions and dynamic behavior</li></ul><h3>The “Use Client” Directive Confusion</h3><p>&quot;use client&quot; doesn&#39;t mean &quot;runs on client.&quot; It means &quot;this component and everything it imports need to be sent to the client as JavaScript bundles.&quot;</p><pre>// Server Component (default)<br>async function UserProfile({ userId }) {<br>  const user = await db.users.findById(userId); // Direct DB access!<br>  return (<br>    &lt;div&gt;<br>      &lt;h1&gt;{user.name}&lt;/h1&gt;<br>      &lt;InteractiveButton userId={userId} /&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><pre>// Client Component - needs interactivity<br>&quot;use client&quot;;<br>function InteractiveButton({ userId }) {<br>  const [liked, setLiked] = useState(false);<br>  return (<br>    &lt;button onClick={() =&gt; setLiked(!liked)}&gt;<br>      {liked ? &#39;Unlike&#39; : &#39;Like&#39;}<br>    &lt;/button&gt;<br>  );<br>}</pre><p><strong>Key insight:</strong> Server Components can render Client Components, but not vice versa. It’s a one-way street.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NOUbjZ8LeVPLX9D9.png" /></figure><h3>The Data Fetching Revolution</h3><h3>The Old Way (Don’t Do This)</h3><pre>function UserList() {<br>  const [users, setUsers] = useState([]);<br>  const [loading, setLoading] = useState(true);<br>  <br>  useEffect(() =&gt; {<br>    fetch(&#39;/api/users&#39;)<br>      .then(res =&gt; res.json())<br>      .then(setUsers)<br>      .finally(() =&gt; setLoading(false));<br>  }, []);<br>  <br>  if (loading) return &lt;Spinner /&gt;;<br>  return users.map(user =&gt; &lt;UserCard key={user.id} user={user} /&gt;);<br>}</pre><h3>The RSC Way (Much Better)</h3><pre>async function UserList() {<br>  const users = await db.users.findMany(); // Direct DB access<br>  return users.map(user =&gt; &lt;UserCard key={user.id} user={user} /&gt;);<br>}</pre><p>No loading states, no useEffect, no API endpoints. The component just gets the data and renders it.</p><h3>Patterns That Actually Work</h3><h3>Pattern 1: Server for Data, Client for Interaction</h3><pre>// Server Component<br>async function ProductPage({ productId }) {<br>  const product = await getProduct(productId);<br>  <br>  return (<br>    &lt;div&gt;<br>      &lt;ProductInfo product={product} /&gt;<br>      &lt;AddToCartButton productId={productId} /&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><pre>// Client Component<br>&quot;use client&quot;;<br>function AddToCartButton({ productId }) {<br>  const [isAdding, setIsAdding] = useState(false);<br>  // Handle all interactivity here<br>}</pre><h3>Pattern 2: The Client Boundary Strategy</h3><p><strong>[Search: “react client boundary visualization nextjs” — look for diagrams showing how ‘use client’ affects component trees]</strong></p><p>The client boundary is like a one-way membrane. Once you cross into client land with &quot;use client&quot;, everything underneath is also client-side. Plan accordingly.</p><h3>Common Pitfalls I Fell Into</h3><h3>Pitfall 1: Making Everything a Client Component</h3><p>I slapped &quot;use client&quot; on everything because it felt &quot;safe.&quot; This defeats the purpose. Start with Server Components and only add &quot;use client&quot; when you need browser APIs.</p><h3>Pitfall 2: Trying to Pass Functions as Props</h3><pre>// This breaks<br>function ServerComponent() {<br>  const handleClick = () =&gt; console.log(&#39;clicked&#39;);<br>  return &lt;ClientComponent onClick={handleClick} /&gt;; // Error!<br>}</pre><p>Use Server Actions instead:</p><pre>async function handleClick() {<br>  &quot;use server&quot;;<br>  console.log(&#39;clicked on server&#39;);<br>}</pre><h3>When RSCs Actually Shine</h3><h3>Database-Heavy Applications</h3><pre>async function OrderHistory({ userId }) {<br>  const orders = await db.orders<br>    .findMany({ userId })<br>    .include({ items: true });<br>  <br>  return orders.map(order =&gt; &lt;OrderCard key={order.id} order={order} /&gt;);<br>}</pre><p>No API layer, no serialization issues, no loading states.</p><h3>Performance Benefits</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*QKUqAAfUXd0w1aHT.png" /></figure><p>The improvements are dramatic:</p><ul><li><strong>Bundle size reduction</strong>: 40–60% smaller on content-heavy apps</li><li><strong>Instant data loading</strong>: No loading spinners for initial data</li><li><strong>Better Core Web Vitals</strong>: Faster FCP, LCP, reduced CLS</li></ul><h3>The Developer Experience Reality</h3><h3>The Good</h3><ul><li>Simpler data fetching</li><li>Better performance by default</li><li>Direct database access</li></ul><h3>The Challenging</h3><ul><li>New mental model</li><li>Debugging across boundaries</li><li>Limited ecosystem support</li></ul><h3>The Ugly</h3><ul><li>Cryptic error messages</li><li>Hot reload issues</li><li>Third-party library compatibility</li></ul><h3>Making the Mental Shift</h3><p><strong>Old Thinking:</strong> “Components are functions that run in the browser”<br> <strong>New Thinking:</strong> “Components are functions that can run anywhere, and I choose where”</p><p>Stop thinking “React components” — start thinking “Server Components” and “Client Components” as different tools:</p><ul><li><strong>Server Components</strong>: Data, initial rendering, server resources</li><li><strong>Client Components</strong>: Interactions, state, browser APIs</li></ul><h3>Real-World Example: A Blog</h3><pre>// Server Component<br>async function BlogPost({ params }) {<br>  const post = await getPostBySlug(params.slug);<br>  <br>  return (<br>    &lt;article&gt;<br>      &lt;PostHeader post={post} /&gt;<br>      &lt;PostContent content={post.content} /&gt;<br>      &lt;ShareButtons post={post} /&gt;<br>      &lt;CommentSection postId={post.id} /&gt;<br>    &lt;/article&gt;<br>  );<br>}</pre><pre>// Client Component<br>&quot;use client&quot;;<br>function ShareButtons({ post }) {<br>  const shareToTwitter = () =&gt; {<br>    window.open(`https://twitter.com/intent/tweet?text=${post.title}`);<br>  };<br>  <br>  return &lt;button onClick={shareToTwitter}&gt;Share&lt;/button&gt;;<br>}</pre><p>Data flows from server, interactivity at client boundaries.</p><h3>Tools and Resources</h3><p><strong>[Search: “nextjs app router folder structure” — look for screenshots showing the new app directory layout vs pages directory]</strong></p><p><strong>Frameworks with RSC Support:</strong></p><ul><li><strong>Next.js 13+</strong>: Most mature implementation</li><li><strong>Remix</strong>: Excellent patterns that translate well</li></ul><p><strong>Libraries That Work:</strong></p><ul><li><strong>Prisma</strong>: Perfect for Server Components</li><li><strong>Tailwind CSS</strong>: Works across boundaries</li></ul><p><strong>Getting Started:</strong></p><ol><li>npx create-next-app@latest</li><li>Use app directory</li><li>Start with simple data fetching</li><li>Learn the patterns gradually</li></ol><p><strong>Additional Resources:</strong></p><ul><li><a href="https://github.com/reactjs/rfcs/pull/188">React Server Components RFC</a></li><li><a href="https://nextjs.org/docs/getting-started/react-essentials">Next.js RSC Documentation</a></li><li><a href="https://github.com/vercel/app-playground">Vercel RSC Examples</a></li></ul><h3>My Honest Take</h3><p><strong>The learning curve is real.</strong> You’ll feel confused and frustrated. That’s normal.</p><p><strong>The benefits are substantial.</strong> Better performance, simpler data fetching, clearer separation of concerns.</p><p><strong>Start experimenting now.</strong> Even if you can’t use RSCs in production yet, understanding the patterns will make you better.</p><h3>Conclusion</h3><p>RSCs aren’t replacing React knowledge — they’re extending it. Your existing skills with state, props, and composition still work. You’re just adding server-side rendering to your toolkit.</p><p>The mental model shift is like learning manual transmission after automatic. The fundamentals don’t change, but you gain more control.</p><p>Break your mental model and rebuild it stronger. Your users will thank you for the performance improvements, and your future self will appreciate the simpler data fetching patterns.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e9f37a56ed6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feature Sliced Design — The best Front-end Architecture]]></title>
            <link>https://medium.com/@nderdweik/feature-sliced-design-the-best-front-end-architecture-c49c93fce451?source=rss-726189d9815f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c49c93fce451</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[front-end-architecture]]></category>
            <category><![CDATA[feature-sliced-design]]></category>
            <category><![CDATA[fsds]]></category>
            <dc:creator><![CDATA[Nader Dweik]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 10:12:10 GMT</pubDate>
            <atom:updated>2025-08-10T08:06:12.068Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stop Writing React Like It’s 2018 This Architecture Will Blow Your Mind - Feature Sliced Design</h3><h3>My Journey with Feature-Sliced Design: Why I’ll Never Go Back to Messy Code</h3><p>one month ago, I was drowning in my own codebase. You know that feeling when you open your project after a weekend and spend 20 minutes just trying to remember where you put that one component? Yeah, that was me every single Sunday morning (Yeah in middle east we work on Sunday -_- ).</p><p>My React app had grown into this massive beast where everything was connected to everything else, and honestly, I was scared to touch anything because I knew it would break something somewhere else.</p><p>That’s when I discovered Feature-Sliced Design, and I’m not exaggerating when I say it completely changed how I build frontend applications. I’m gonna walk you through what FSD actually is, why I switched to it, and how you can start using it in your own projects.</p><h3>What Actually Is Feature-Sliced Design?</h3><p>when I first heard about FSD, I thought it was just another fancy architecture pattern that some Russian developers came up with to make their lives more complicated. I was wrong. Dead wrong.</p><p>Feature-Sliced Design is basically a way to organize your frontend code that makes sense to both your brain and your business requirements. Instead of having folders like “components,” “hooks,” and “utils” scattered everywhere, you organize everything by what it actually does in your business logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*kpCUCro03YYnDSIkLFI4tg.png" /><figcaption><em>This is how FSD organizes your entire application — layers on the left, slices in the middle, and segments on the right</em></figcaption></figure><p>The diagram above shows the core concept. You’ve got three main parts:</p><ul><li><strong>Layers</strong>: These are like floors in a building — each one has a specific purpose</li><li><strong>Slices</strong>: Think of these as rooms on each floor — they’re your actual features</li><li><strong>Segments</strong>: These are like furniture in each room — your UI, logic, and API calls</li></ul><h3>The Seven Layers That Changes everyhting</h3><p>I’m gonna break down each layer from top to bottom, and trust me, once you get this hierarchy in your head, you’ll never want to go back to the old way.</p><h3>App Layer</h3><p>This is where I put everything that starts my application. Store configuration, router setup, global providers — all that boring but essential stuff lives here. I used to scatter this across multiple files, but now it’s all in one place and I actually know where to find it.</p><h3>Processes Layer</h3><p>Honestly, I don’t use this layer much in smaller projects, but when I’m building something complex with multi-step workflows, this is where the magic happens. It’s like having a conductor for your orchestra of features.</p><h3>Pages Layer</h3><p>Every URL in my app corresponds to something in this layer. HomePage, ProductPage, ProfilePage — you get the idea. These are basically containers that pull together different widgets and features. I love this because when I need to debug something related to a specific page, I know exactly where to look.</p><h3>Widgets Layer</h3><p>This is where I build those bigger UI blocks that combine multiple features. Think of a product catalog that includes search, filters, and product listings. It’s not quite a full page, but it’s more than just a simple component.</p><h3>Features Layer</h3><p>This is my favorite layer, and here’s why: every folder in here represents something valuable that my users can actually do. LoginForm, AddToCart, ProductSearch — these aren’t just components, they’re business capabilities. When someone asks me “where’s the login functionality,” I can point them to features/auth/login and they&#39;ll find everything related to logging in.</p><h3>Entities Layer</h3><p>This is where I keep everything related to my business objects. User, Product, Order — each gets its own folder with all the related UI components, types, and business rules. I used to have user-related code scattered across 15 different files. Now it’s all in one place.</p><h3>Shared Layer</h3><p>All my reusable stuff lives here. UI components, utility functions, API clients — anything that doesn’t have business logic attached to it goes in this layer.</p><h3><strong>Structure example:</strong></h3><p><em>src/<br></em><strong><em>├── 1-app/<br></em></strong><em>│ ├── providers/<br>│ ├── store/<br>│ ├── styles/<br>│ └── App.tsx<br>├── </em><strong><em>2-pages/</em></strong><em><br>│ └── dashboard/<br>│ ├── lib/hooks/<br>│ ├── model/<br>│ └── ui/<br>├── </em><strong><em>3-widgets/</em></strong><em><br>│ ├── case-list-table/<br>│ ├── case-status-filters/<br>│ ├── doctor-selector/<br>│ └── profile-switcher/<br>├──</em><strong><em> 4-features/</em></strong><em><br>│ ├── case-actions/<br>│ │ ├── api/<br>│ │ ├── lib/hooks/<br>│ │ ├── model/<br>│ │ └── ui/<br>│ └── retainer-request/<br>│ ├── api/<br>│ ├── lib/hooks/<br>│ ├── model/<br>│ └── ui/<br>├── </em><strong><em>5-entities/</em></strong><em><br>│ ├── case/<br>│ │ ├── api/<br>│ │ ├── lib/<br>│ │ ├── model/<br>│ │ └── ui/<br>│ ├── doctor/<br>│ ├── permission/<br>│ └── profile/<br>└─</em><strong><em>─ 6-shared/</em></strong><em><br> ├── api/<br> ├── config/<br> ├── lib/<br> │ ├── hooks/<br> │ └── utils/<br> ├── model/<br> └── ui/components/</em></p><h3>How Dependencies Actually Work</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*PBzjWwdAowNQ7eMt_MsF9A.png" /><figcaption><em>This shows how different layers can import from each other — notice how it only flows downward</em></figcaption></figure><p>The rule is simple: you can only import from layers below you. Pages can use Widgets, Features, and Entities. But Features can’t use other Features, and Entities can’t use Features.</p><p>I know this sounds restrictive, but it’s actually liberating. I never have to worry about circular dependencies anymore. I never accidentally create tight coupling between features. When I want to share functionality between features, I either put it in Entities (if it’s domain-related) or Shared (if it’s generic).</p><p>Look at the diagram — you can see how a LoginPage might import from UserProfile, AuthButton, Navigation, and Dashboard. But notice how all those arrows point in the same direction. This isn’t just theory — this is how I actually structure my imports, and it works beautifully.</p><h3>The Public API Pattern That Saved My Sanity</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*XdcjKZfjgZKGmdd39B7MuQ.png" /><figcaption><em>Each slice exposes only what other layers need through clean public APIs</em></figcaption></figure><p>Here’s something that took me a while to appreciate: every slice (whether it’s a feature, entity, or widget) should expose its functionality through an index.ts file. This creates a clean public API.</p><p>I used to import components directly from deep nested paths. Now I import everything from clean, predictable locations. When I refactor the internal structure of a feature, I only need to update one file — the index.ts — and everything else keeps working.</p><p>The diagram shows exactly how this works. Each layer exposes specific things through its public API files, and the consuming layers get clean, predictable imports.</p><h3>Segments: How I Organize Inside Each Slice</h3><p>Inside every slice, I organize code into segments:</p><p><strong>UI Segment</strong> — All my React components live here. Just the presentation layer, nothing else.</p><p><strong>Model Segment</strong> — This is where I put state management, business logic, types, and hooks. Everything that deals with data and behavior.</p><p><strong>API Segment</strong> — All external communication. HTTP calls, GraphQL queries, websocket connections.</p><p><strong>Lib Segment</strong> — Utilities that are specific to this slice. Validation functions, formatters, helper functions.</p><p><strong>Config Segment</strong> — Constants and configuration that this slice needs.</p><p>I don’t create all these segments for every slice — only when I need them. A simple entity might only have UI and Model segments, while a complex feature might have all five.</p><h3>Why I Actually Switched ?</h3><p>Let me tell you about the real-world benefits I’ve experienced:</p><p><strong>I Know Where Everything Lives</strong> When I need to find user-related functionality, I go to entities/user. When I need to find authentication logic, I go to features/auth. No more grep-ing through the entire codebase trying to find that one function.</p><p><strong>New Team Members Get Productive Fast</strong> I recently onboarded a junior developer, and they were contributing meaningful code within three days. The structure is so logical that once you understand the layers, you can navigate any FSD codebase.</p><p><strong>Features Stay Independent</strong> I can develop, test, and deploy features independently. My shopping cart feature doesn’t accidentally depend on my user profile feature. This makes the codebase more stable and easier to maintain.</p><p><strong>Refactoring Is Actually Pleasant</strong> I recently had to completely restructure how we handle user permissions. In my old codebase, this would have been a nightmare involving dozens of files. With FSD, I only had to touch the entities/user folder and update a few feature imports.</p><p><strong>Business People Understand My Code Structure</strong> When I show my project structure to product managers or designers, they immediately understand how it maps to the features they care about. This has improved communication significantly.</p><h3>How to stasrt using FSD ?</h3><p>I’m not gonna lie to you — switching to FSD isn’t trivial. But you don’t have to do it all at once. Here’s how I’d approach it if I were starting fresh:</p><p><strong>Start Small</strong> Pick one feature in your current project and try to restructure it using FSD principles. Create the folder structure, move the related files, and see how it feels.</p><p><strong>Focus on Shared First</strong> Extract your common components and utilities into a shared layer. This gives you immediate benefits and helps you understand the pattern.</p><p><strong>Think in Business Terms</strong> When you’re organizing features, ask yourself: “What can users actually do with this?” That’s probably a feature. “What business concepts does this represent?” That’s probably an entity.</p><p><strong>Don’t Overthink Segments</strong> You don’t need all five segments in every slice. Start with just UI and Model, then add others as you need them.</p><h3>Common Mistakes I Made (So You Don’t Have To)</h3><p><strong>Trying to Perfect It Immediately</strong> My first FSD project was a mess because I spent too much time trying to get the architecture perfect before I understood how the pieces fit together. Start simple and evolve.</p><p><strong>Making Everything a Feature</strong> Not every piece of functionality needs to be a feature. Simple, reusable components belong in the shared layer.</p><p><strong>Ignoring the Import Rules</strong> I initially tried to bend the rules when they felt inconvenient. Don’t. The constraints are there for a reason, and fighting them usually means you’re organizing something incorrectly.</p><p><strong>Over-segmenting</strong> I created way too many segments initially. Most of my slices only need 2–3 segments, not all five.</p><h3>Is FSD Right for Your Project?</h3><p>I’ll be honest , FSD isn’t for everyone. If you’re building a simple landing page or a quick prototype, it’s probably overkill. But if you’re working on:</p><ul><li>A growing application with multiple features</li><li>A team project where multiple developers need to collaborate</li><li>Something that will need to be maintained long-term</li><li>An app with complex business logic</li></ul><p>Then I’d seriously consider giving FSD a try. It’s been a game-changer for me, and I think it could be for you too.</p><h3>Conclusion:</h3><p>I’ve been using FSD for one month now across multiple projects, and I honestly can’t imagine going back. It’s not perfect — no architecture is — but it solves real problems that I face every day as a frontend developer.</p><p>The best part? It’s not just about organizing code. It’s about organizing your thoughts, your team’s understanding, and your approach to building software. When your code structure reflects your business logic, everything else just flows better.</p><p>If you’re tired of hunting through folders trying to find where you put that component, if you’re frustrated with tightly coupled features breaking each other, if you want a codebase that actually makes sense — give Feature-Sliced Design a shot. Start small, be patient with yourself, and I think you’ll be surprised by how much clearer your code becomes.</p><p>I’m not saying it’ll solve all your problems, but it solved a lot of mine. And honestly, that’s good enough for me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c49c93fce451" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Frontend Developer Journey: A Simple Roadmap]]></title>
            <link>https://medium.com/@nderdweik/your-frontend-developer-journey-a-simple-roadmap-9b487042a696?source=rss-726189d9815f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b487042a696</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[roadmaps]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[frontend-roadmap]]></category>
            <dc:creator><![CDATA[Nader Dweik]]></dc:creator>
            <pubDate>Tue, 27 May 2025 08:39:05 GMT</pubDate>
            <atom:updated>2025-05-27T08:39:05.524Z</atom:updated>
            <content:encoded><![CDATA[<p>Starting your web development journey can feel scary. But don’t worry! This roadmap will take you from <strong>zero</strong> to <strong>hero </strong>in just a few months:</p><h3>Phase 1: HTML + CSS (2 Weeks)</h3><p>HTML is like the skeleton of a website. CSS makes it look pretty. Spend your first two weeks learning both together.</p><p>Start with simple things:</p><ul><li>Make headings and paragraphs</li><li>Add images and links</li><li>Use CSS to change colors and fonts</li><li>Create simple layouts</li></ul><p>Think of HTML as building a house frame. CSS is like painting and decorating that house. You need both to make something people want to visit!</p><h3>Phase 2: JavaScript Magic (4 Weeks)</h3><p>JavaScript is where the real fun begins. This is what makes websites interactive. Spend 4 full weeks here — it’s super important!</p><p>Learn these basics:</p><ul><li>Variables and functions</li><li>How to respond to button clicks</li><li>Showing and hiding content</li><li>Making simple animations</li></ul><p>JavaScript might feel hard at first. That’s normal! Everyone struggles with it. Just keep practicing every day.</p><h3>Phase 3: Your First Real Project (2–3 Weeks)</h3><p><strong>Build a movie website from scratch:</strong></p><p>Now comes the exciting part. Use everything you learned to build a movie website. This project will teach you how real websites work.</p><p>Your movie site should have:</p><ul><li>A homepage with popular movies</li><li>Movie details pages</li><li>Search functionality</li><li>Nice design and colors</li></ul><h3>Phase 4: Upgrade with SCSS (1–2 Weeks)</h3><p>SCSS is like CSS but much better. It helps you write cleaner, more organized styles.</p><p>Learn these cool features:</p><ul><li>Variables for colors and sizes</li><li>Nesting your styles</li><li>Mixins for reusable code</li><li>Functions and calculations</li></ul><p>Take your movie website and convert all the CSS to SCSS. You’ll see how much cleaner your code becomes!</p><h3>Phase 5: React Revolution (3–4 Weeks)</h3><p>React is the most popular way to build websites today. It might seem confusing at first, but it’s actually really logical.</p><p>Start with:</p><ul><li>Components (think of them as website building blocks)</li><li>Props (how components talk to each other)</li><li>State (how to remember and change information)</li><li>Events (responding to user actions)</li></ul><p>Also learn Vite — it’s a super fast tool that helps you build React apps quickly.</p><h3>Phase 6: Redux Toolkit (2 Weeks)</h3><p>When your React apps get bigger, you need Redux Toolkit. It helps you manage all your app’s data in one place.</p><p>This part is tricky, but very important for real jobs. Take your time and practice with small examples first.</p><h3>Phase 7: TypeScript Power (2–3 Weeks)</h3><p>TypeScript is JavaScript with superpowers. It helps you catch mistakes before they happen.</p><p>Learn:</p><ul><li>How to add types to your variables</li><li>Interface definitions</li><li>Generic types</li><li>Converting your React projects to TypeScript</li></ul><p>Many companies require TypeScript, so this step is really important for getting hired.</p><h3>Phase 8: Next.js Mastery (3–4 Weeks)</h3><p>Next.js is React’s bigger brother. It helps you build fast, SEO-friendly websites that companies love.</p><p>Focus on:</p><ul><li>Server-side rendering</li><li>File-based routing</li><li>API routes</li><li>Static site generation</li><li>Deployment with Vercel</li></ul><h3>Phase 9: Testing Like a Pro (2–3 Weeks)</h3><p>Learn two types of testing:</p><ul><li><strong>Jest</strong>: For testing your functions and components</li><li><strong>Cypress</strong>: For testing your entire website like a real user</li></ul><p>Testing might seem boring, but it’s what separates beginners from professionals.</p><h3>Your Success Timeline</h3><p><strong>Total time: About 6–7 months</strong></p><p>This might seem long, but remember — you’re building a career that can last decades! Every week you invest now will pay off for years to come.</p><h3>Pro Tips for Success</h3><p><strong>Practice every single day.</strong> Even 30 minutes is better than studying for 5 hours once a week.</p><p><strong>Build projects constantly.</strong> Don’t just watch tutorials — build real things you can show to employers.</p><p><strong>Join developer communities.</strong> Find other people learning the same things. Help each other out!</p><p><strong>Don’t rush.</strong> It’s better to really understand each step than to race through everything.</p><h3>The Big Picture</h3><p>Frontend development is an amazing career. You get to build things millions of people might use. You solve real problems and make the internet a better place.</p><p>This roadmap will take you from complete beginner to job-ready developer. Some steps will be harder than others. Some days you’ll want to quit. That’s totally normal!</p><p>Remember: every expert was once a beginner. The only difference between you and them is that they didn’t give up.</p><p><strong>Your frontend developer journey starts today. Are you ready to begin :)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*_pJn-EmWCu0brEPK_cYrEQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b487042a696" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>