<?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 Akshaya Rangesh on Medium]]></title>
        <description><![CDATA[Stories by Akshaya Rangesh on Medium]]></description>
        <link>https://medium.com/@akshayarangesh18?source=rss-e34591588119------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DaQEShTPh5R0sgduWhjdtw.png</url>
            <title>Stories by Akshaya Rangesh on Medium</title>
            <link>https://medium.com/@akshayarangesh18?source=rss-e34591588119------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 13:57:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akshayarangesh18/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[Modernizing a Frontend Without Stopping Delivery]]></title>
            <link>https://medium.com/@akshayarangesh18/modernizing-a-frontend-without-stopping-delivery-6ca7835287c5?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ca7835287c5</guid>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[technical-debt]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Tue, 01 Dec 2026 06:26:37 GMT</pubDate>
            <atom:updated>2026-12-01T06:26:37.388Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The challenge isn’t replacing old technology. It’s changing an application while the business still depends on it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EpwOeL4mKhYUgw02LHVRlA.png" /></figure><p>Every growing app reaches the same point. Changing it becomes harder than building something new.</p><p>A feature that used to take days takes weeks. A small change touches unrelated screens. Developers start checking everything twice because they don’t know what will break.</p><p>The first suggestion is usually a rewrite. A newer framework. A cleaner architecture. A fresh start.</p><p>It’s a tempting answer. But the old app still runs the business. Customers still expect improvements, and new requirements keep arriving.</p><p>So modernization isn’t a technology upgrade. It’s an engineering decision made while the product keeps moving.</p><h3>A Rewrite Is Rarely the First Move</h3><p>A rewrite gives you an opportunity to establish a cleaner architecture. It also means rebuilding behavior nobody documented, moving users across two systems, and maintaining both while the new one catches up.</p><p>Rewrites aren’t always wrong. Sometimes the current architecture genuinely blocks progress. But a rewrite should be a conclusion you reach after evaluating other options, not the default response to accumulated complexity.</p><h3>Start Where Change Hurts</h3><p>Not every module needs modernizing at once. Some are stable. Others make every change risky.</p><p>Ask three questions:</p><ul><li>Which areas are hardest to change?</li><li>Where does a change in one place break something else?</li><li>Which parts of the application slow delivery the most?</li></ul><p>Those answers show where to start.</p><p>The goal isn’t a uniformly modern codebase. It’s removing the constraints that make every future change expensive.</p><h3>Migrate One Module at a Time</h3><p>Modernize in sequence. Pick one module, understand its current behavior, improve it, and validate the result before moving on.</p><p>On one project, we modernised an existing application incrementally across multiple modules. Each module provided a bounded scope to understand the existing implementation, make improvements, and validate the changes.</p><p>Product work continued alongside the effort. We didn’t have to wait for a complete replacement before moving forward.</p><p>That’s what makes incremental modernisation practical. It gives engineering teams a way to improve the application without putting the rest of the delivery roadmap on hold.</p><h3>Document as You Go</h3><p>Older modules often have no written requirements, no clear boundaries, and no list of dependencies. The code is the only documentation, and the code doesn’t say why it was built that way.</p><p>Migration is the moment to fix that.</p><p>When you touch a module, write down what it does, what it depends on, and what depends on it. Keep the notes in the repository, next to the code, where the next engineer will look.</p><p>Record the things you had to learn the hard way. Those are the things the next team will otherwise rediscover.</p><p>Skip this step, and the next team faces the same unknowns. Today’s migration becomes tomorrow’s rewrite.</p><h3>Plan for Coexistence</h3><p>Incremental migration means old and new code run side by side.</p><p>That’s where problems hide. Engineers need to know which parts have changed. Shared behavior must stay predictable. Each migrated module needs a clear boundary and a way to verify it still works with the rest of the application.</p><p>Without those, incremental migration just creates a second kind of mess.</p><p>The transition needs to be as deliberate as the changes themselves.</p><h3>Measure What Got Easier</h3><p>“Three modules migrated” tells you about effort. It doesn’t tell you about outcome.</p><p>Ask better questions:</p><ul><li>Can engineers make changes with less uncertainty?</li><li>Are defects easier to isolate?</li><li>Can new features ship without working around the same limitations?</li></ul><p>Those answers justify the work.</p><p>The real value of modernisation is not the amount of old code replaced. It’s the engineering friction removed and the confidence gained in making future changes.</p><h3>Protect Delivery While You Improve</h3><p>The product has to keep moving. The foundation needs attention too.</p><p>Pausing everything to fix the foundation is rarely realistic, and ignoring it makes every release harder.</p><p>Make technical change part of the delivery plan. Put the investment where it removes the most risk. Break large changes into steps that can be planned, delivered, and validated alongside regular product work.</p><p>Success isn’t how much old code is gone. It’s whether the next change is easier to make, and whether engineers can make it with confidence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ca7835287c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Production Breaks, Who Knows?]]></title>
            <link>https://medium.com/@akshayarangesh18/when-production-breaks-who-knows-0739e349a688?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/0739e349a688</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[frontend-architecture]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 05:44:45 GMT</pubDate>
            <atom:updated>2026-11-24T05:44:45.378Z</atom:updated>
            <content:encoded><![CDATA[<p>Frontend architecture is also about knowing when things fail, where they fail, and who owns the recovery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zzym7ob6663-VcLQzrFLDw.jpeg" /></figure><p>A user says the checkout page is blank.</p><p>You open the logs. Nothing useful. The error was swallowed three layers down, the request ID never reached the reporting tool, and nobody knows who owns the checkout error handling.</p><p>That’s not just a debugging problem. It’s an architecture gap.</p><h3>Observability Is a Design Choice</h3><p>When something breaks, you need to answer three questions: what failed, where, and who was affected.</p><p>You shouldn’t have to reproduce the bug on your machine to answer them.</p><p>Error reporting is easy to add at the end. It’s much harder once the flow is tangled. Design it alongside the boundaries.</p><p>For every feature, ask:</p><ul><li>Does the error reach the reporting tool when it fails?</li><li>Does the report name the feature and the step?</li><li>Can you connect it to the request or user session?</li></ul><p>If not, you have an observability gap to address.</p><h3>Failures Should Stay Local</h3><p>A broken recommendations widget should not block checkout.</p><p>Each feature should define what the user sees when its data is unavailable. Show a fallback or a message in that section. The rest of the page keeps working.</p><p>Error boundaries catch rendering failures. They don’t catch a failed API call or errors thrown from event handlers, so those paths need their own handling.</p><p>Some failures must stop the flow. A payment that didn’t go through is one of them. Decide which failures can be isolated and which must interrupt the journey. Don’t send them all through the same fallback.</p><h3>Every Error Has an Owner</h3><p>When an error appears, someone should be able to say which team owns that code.</p><p>If the answer is “everyone,” nobody fixes it.</p><p>Tag errors by feature. Route alerts to the team that owns the feature. Reporting is only the start. Someone has to own the fix.</p><h3>Make It Part of the Template</h3><p>Error boundaries and reporting belong in the feature template, not in a cleanup task after an incident.</p><p>Code review should catch swallowed errors and missing context before they ship.</p><h3>Use AI Without Silent Failures</h3><p>AI tools often write try/catch blocks that log nothing and return an empty array. The UI still renders. The failure disappears.</p><p>Set the behavior in the prompt:</p><pre>Fetch recommendations for the product page.</pre><pre>If the request fails:<br>- Show a fallback in the recommendations section only.<br>- Report the error with the feature name and request ID.<br>- Preserve the original error context.<br>- Do not silently swallow the error.<br>- Do not block the rest of the page.</pre><p>Then check the diff. A working UI doesn’t mean the failure was handled.</p><h3>Takeaway</h3><p>Pick one feature. Make its main API call fail on purpose.</p><p>Did the error reach your reporting tool? Can you tell which feature it came from? Did the rest of the page keep working?</p><p>If any answer is no, that’s your next piece of work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0739e349a688" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keep State Where It Belongs]]></title>
            <link>https://medium.com/@akshayarangesh18/keep-state-where-it-belongs-50a2bda5aa11?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/50a2bda5aa11</guid>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Thu, 19 Nov 2026 05:54:53 GMT</pubDate>
            <atom:updated>2026-11-24T05:46:09.682Z</atom:updated>
            <content:encoded><![CDATA[<h3>A product price appears on the product page, in the cart, and in the checkout summary.</h3><p>Each screen fetches and stores its own copy. One refreshes, another doesn’t. A customer sees two different prices and calls support.</p><p>That’s not a rendering bug. It’s a state ownership bug.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yi58CWtGocj04SxVUmJ-Bg.png" /></figure><h3>Ownership Comes Before the Tool</h3><p>Most state discussions start with the library. Redux or Context or Zustand. The better first question is who owns the value, and where is the truth stored?</p><p>Ask one thing: which part of the system is allowed to change this, and where is the authoritative value?</p><p>Once you answer that, the tool choice gets much easier.</p><h3>Four Kinds of State</h3><p>Most state falls into one of four groups.</p><p><strong>Local UI state.</strong> Whether a dropdown is open. It belongs to the component that uses it.</p><p><strong>Feature state.</strong> A multi-step workflow’s draft values. It belongs to the feature that coordinates those steps.</p><p><strong>Server state.</strong> Orders, prices, and profiles. The backend owns this. The frontend holds a cached copy with a freshness rule.</p><p><strong>URL state.</strong> The current filter, page number, or selected tab, when users should be able to share or bookmark it. The URL owns this.</p><p>Mixing these groups causes most of the bugs. A server value copied into local state, with no synchronization rule, is a classic example.</p><h3>One Source of Truth Per Value</h3><p>Every value should have one authoritative owner. Other places can read it or derive from it. They shouldn’t keep their own copy that can change.</p><p>Derived values are fine. A total computed from cart items isn’t a second source of truth. It’s a view of the first one.</p><p>The problem is independent copies that drift apart.</p><h3>Keep Transitions Explicit</h3><p>Shared state should change through clearly defined actions, rather than scattered updates across components.</p><p>If you can’t list the actions that change a piece of state, you can’t reason about it when something goes wrong.</p><h3>When to Bend the Rule</h3><p>Sometimes a value needs to exist in two forms. A checkout draft differs from the saved order until the user submits. That’s a legitimate second state, as long as the rule for when it syncs is clear.</p><p>Put the sync rule in one place. Don’t let it be implied by component order.</p><h3>Make the Rule Visible</h3><p>Name the owner in the code. A hook called useOrderTotal tells the next engineer where the value comes from.</p><p>Review for it. If a new feature adds a second copy of server data, ask why.</p><h3>Use AI Without Creating a Second Copy</h3><p>AI tools often store fetched data in local state because it’s the shortest path to something that renders.</p><p>State the ownership in the prompt:</p><pre>Show the order total on the checkout page.</pre><pre>The total is server state owned by the orders API.<br>Read it through the existing useOrderTotal hook.<br>Do not store the total in local component state.<br>Derived values can be computed from the hook&#39;s data.</pre><p>Then check the diff. Did the generated code store fetched data in a new useState? If it did, check whether you’ve introduced a second source of truth or an unnecessary synchronization problem.</p><h3>Takeaway</h3><p>Pick one value that appears on more than one screen. Write down who owns it, and where it’s allowed to change.</p><p>If you can’t answer in one sentence, that value is where your next bug might come from.</p><p><a href="https://medium.com/@akshayarangesh18/when-production-breaks-who-knows-0739e349a688"><em>Next: observability, error handling, and who owns what when it breaks.</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50a2bda5aa11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Where Components End and Features Begin]]></title>
            <link>https://medium.com/@akshayarangesh18/where-components-end-and-features-begin-51dc2720f54f?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/51dc2720f54f</guid>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 06:33:03 GMT</pubDate>
            <atom:updated>2026-11-19T05:56:15.588Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v8Vbb0tC3ejzyPdw4L6Fcw.png" /></figure><p>Your Button shouldn’t know what an order is</p><p>But in many codebases, it does. Someone adds a prop for one screen, then a check for one business rule. Soon the shared Button knows about order status, cancellation permissions, and checkout behavior.</p><p>It still renders a button. But changing one feature now means touching a component used across the whole app.</p><p>That’s where component and feature boundaries start to blur.</p><h3>Two Different Boundaries</h3><p>A component boundary defines what a piece of UI owns and what it exposes.</p><p>A feature boundary defines which business capability owns a behavior and who changes it when the business changes.</p><p>Reuse and ownership are different things. A shared Button can appear in checkout, profile, and settings without knowing about any of them. Each feature decides what the button does and passes the handler in through props.</p><p>The Button renders. The feature owns the decision.</p><h3>Keep the Dependency Direction Clear</h3><p>Features import shared UI components. Shared UI components shouldn’t depend on the features that use them. And one feature shouldn’t reach into another feature’s internal files just because it can.</p><p>If checkout needs data owned by profile, it should depend on a defined interface, such as a public module API or a shared data service. It shouldn’t import profile’s internal components or reach into its state.</p><p>The implementation can vary. What matters is that dependencies are intentional, not accidental connections between internal details.</p><h3>When Should Something Become Shared?</h3><p>It’s tempting to extract a component as soon as the same markup appears twice. But similar code doesn’t always mean the same responsibility.</p><p>Checkout and order history might both display a status label today, but they may need different behavior tomorrow. Forcing both into one abstraction could make future changes harder.</p><p>Extract something to shared when there’s a genuine reason to share it, whether that’s a second use or behavior that multiple consumers need to handle consistently.</p><p>The goal isn’t to eliminate duplication at any cost. It’s to avoid dependencies that make unrelated features change together.</p><h3>Make the Boundary Enforceable</h3><p>A boundary that exists only in a diagram is easy to ignore.</p><p>ESLint import restrictions can prevent a feature from importing another feature’s internal files while still allowing access through an approved public interface. Run those rules in CI so violations fail the check instead of relying entirely on code reviews.</p><p>Not every architectural decision can be enforced through tooling. But when a dependency rule can be automated, it shouldn’t depend only on developer memory.</p><h3>Migrate One Feature at a Time</h3><p>Most teams inherit tangled codebases. A rewrite rarely makes sense.</p><p>Pick one feature that causes friction. Expose a small public interface, restrict direct imports into its internals, and verify existing behavior before expanding the approach to other areas.</p><p>The goal is to reduce coupling incrementally without putting product work on hold.</p><h3>What This Means When Using AI</h3><p>AI tools can introduce boundary problems just as easily, only faster. Ask for a cancel action, and generated code might add an orderStatus prop to the shared Button or put cancellation rules inside it.</p><p>Make the boundary explicit in your prompt:</p><pre>Add a cancel action to the order summary.</pre><pre>The Button is a shared UI component.<br>Do not add order-specific props or business rules.<br>Keep cancellation behavior inside the orders feature.<br>Pass the event handler to the Button through props.<br>Do not import internal files from another feature.</pre><p>Then check the diff. Did a shared component pick up a feature-specific prop? Did a feature bypass a public interface?</p><p>AI can generate working code without preserving your architecture. Those boundaries still need to be part of the review.</p><h3>Takeaway</h3><p>Search your shared UI components for business rules and feature-specific props. Those are useful signals that a boundary may have leaked.</p><p>A shared Button that decides whether an order can be cancelled is the problem. Move that decision back to the orders feature. Let the Button render, and let the feature own the behavior.</p><p><a href="https://medium.com/@akshayarangesh18/keep-state-where-it-belongs-50a2bda5aa11"><em>Next: how to keep state from becoming the thing that breaks everything.</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51dc2720f54f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nobody Drew the Line: The Real Problem with Frontend Architecture]]></title>
            <link>https://medium.com/@akshayarangesh18/nobody-drew-the-line-the-real-problem-with-frontend-architecture-390f79b56c5d?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/390f79b56c5d</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[frontend-architecture]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 08:11:06 GMT</pubDate>
            <atom:updated>2026-11-19T05:09:18.675Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mC52LffTg58ng5MO7u8gnw.png" /></figure><p>Most frontend projects don’t fail because of bad components.</p><p>They fail because nobody decided where things should live.</p><p>You know the feeling. A small change in one place breaks something you never touched. You search the codebase for the fix and find the same logic in three spots, each slightly different.</p><p>The components are usually fine. The problem is how they depend on each other.</p><h3>What Frontend Architecture Means</h3><p>Frontend architecture is how you divide an application into parts, what each part owns, and how those parts talk to each other.</p><p>When you add a feature, you make architecture decisions. Where does its state live? Can it call the API directly? Can it read another feature’s internal logic? What happens when the request fails?</p><p>Components handle what users see and touch. Architecture decides how the pieces fit together and how hard the app is to change.</p><h3>Where Things Start to Break</h3><p>Early on, most decisions look harmless. A component fetches its own data. A business rule goes where it’s needed. Two features share a utility because the code looks alike.</p><p>Then the app grows.</p><p>Two screens fetch the same data in different ways. A pricing fix lands in one flow and misses another. A change in one feature breaks another feature that reads its internal state.</p><p>These problems come from decisions that made sense locally. They weren’t bad code. They were missing boundaries.</p><h3>Eight Questions Worth Asking</h3><p>These are the questions I’d want answered for any app.</p><p><strong>Boundaries.</strong> Where does a feature end? If checkout reads and writes another feature’s internal state, the boundary is gone.</p><p><strong>State.</strong> Who owns each piece of state? Not everything belongs in a global store. The same value kept in two places is where most bugs I’ve traced started.</p><p><strong>Data flow.</strong> How does data move? If any component can change a shared value, you will spend your time guessing where a bug came from.</p><p><strong>API boundaries.</strong> Where do backend calls happen? If every component manages its own requests, loading states, errors, and duplicate calls stop being consistent.</p><p><strong>Business logic.</strong> Where do the rules live? The UI can show pricing or permission rules. The backend enforces the final decision. Name which layer is authoritative.</p><p><strong>Error handling.</strong> What happens when one part fails? A failed request should not take down the whole page if the rest of the page still works.</p><p><strong>Observability.</strong> When a user reports a production bug, can you find out what happened? Without logs and error reporting, you are reproducing bugs from memory.</p><p><strong>Ownership.</strong> Who owns each part? Once teams grow, unowned code means every change needs a meeting.</p><p>You don’t need all eight solved on day one. Answer them before the app gets big enough that changing its structure costs weeks.</p><h3>The Mistakes Behind the Mess</h3><p><strong>Folders are not architecture.</strong> Moving files into features/ and shared/ makes code easier to find. If every feature can still reach into every other feature, nothing has changed.</p><p><strong>Reuse can be the wrong move.</strong> Two pieces of code can look identical and still serve different purposes. Merge them now, and they’ll fight each other when the features diverge.</p><p><strong>Design every layer upfront.</strong> A small app does not need a complex architecture for the size it might reach someday. Start with clear responsibilities. Add boundaries when the pain is real.</p><p><strong>The diagram and the code drift apart.</strong> Check the dependencies in the code, not the picture on the wall.</p><p>The question to ask is not “is this shared?” It’s “does unrelated change stay unrelated?”</p><h3>A Multi-Step Form Is a Good Example</h3><p>I’ve seen a multi-step form go wrong in a predictable way. The steps looked separate on screen. In the code, they were one form with one shared state, and validation ran only on submit.</p><p>A user could finish every step, press submit, and get an error on step two. They had to go back and hunt for the field.</p><p>Nobody made a bad call here. The design followed the requirements as written. The gap was that nobody asked where each step’s rules should live until the form was already built.</p><p>Raise that question at the requirements stage. Give each step its own boundary, and let each step validate its own fields. It costs little at the start and a lot later.</p><h3>What This Means When Using AI</h3><p>AI tools write working components fast. If you don’t say how a component fits the app, you get code that fetches in the UI, copies existing logic, or crosses feature boundaries.</p><p>Set the constraints before you ask for code:</p><pre>Build the checkout summary feature.</pre><pre>- Fetch order data through a feature-level hook.<br>- Keep the presentation component focused on rendering props.<br>- Keep pricing rules in the pricing module.<br>- Do not let presentation components call the API directly.<br>- Handle loading, error, and empty states.</pre><p>Then review where the hook lives and what the new code depends on. That review is the part that still needs you.</p><h3>One Question to Take Away</h3><p>Pick a feature in your app. Trace its state, its modules, and what else touches it.</p><p>Then ask:</p><p><strong>If this feature needed change next month, what else would have to change with it? Should it?</strong></p><p><a href="https://medium.com/@akshayarangesh18/where-components-end-and-features-begin-51dc2720f54f"><em>Next: where component boundaries should end and feature boundaries should begin.</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=390f79b56c5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Product Card That Can Survive Its Second Use]]></title>
            <link>https://medium.com/@akshayarangesh18/building-a-product-card-that-can-survive-its-second-use-4d929e5f099c?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d929e5f099c</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[frontend-engineering]]></category>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Tue, 08 Sep 2026 07:35:10 GMT</pubDate>
            <atom:updated>2026-09-08T07:43:30.802Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the last three articles, I explored three ideas that solve different frontend problems:</p><p>Composition for flexibility.</p><p>Design tokens for consistency.</p><p>Headless and compound components for separating behavior from presentation.</p><p>This article is about putting them together.</p><p>And for that, a product card is good example.</p><p>If you haven&#39;t read the earlier parts</p><p>These three articles explain the individual ideas in more depth:</p><p>Part 1: <a href="https://medium.com/@akshayarangesh18/stop-copy-pasting-components-the-architecture-that-actually-scales-a97f2731b068">Composition</a></p><p>Part 2: <a href="https://medium.com/@akshayarangesh18/you-fixed-copy-pasting-now-stop-colors-from-drifting-5af651e6b37e">Design Tokens</a></p><p>Part 3: <a href="https://medium.com/@akshayarangesh18/build-once-style-everywhere-thats-headless-components-69d06f7f4d86">Headless + Compound Components</a></p><p>You can read this article independently, but the earlier parts provide the foundation.</p><p>A product card rarely stays a product card</p><p>The first version is simple:</p><pre>Image, title, rating, price, stock status, favorite, add to cart.</pre><p>Done.</p><p>Then the second use case arrives.</p><p>Search wants a compact version.</p><p>Wishlist doesn&#39;t need add to cart.</p><p>Recommendations need a different layout.</p><p>Admin needs product information but none of the customer actions.</p><p>The usual solution is more props:</p><p>It works.</p><p>Until it doesn&#39;t.</p><p>The component slowly becomes responsible for every possible variation.</p><p>That&#39;s usually the point where I stop asking, &quot;How do I make this component more configurable?&quot;</p><p>Instead, I ask:</p><p>&quot;Which parts actually need to be shared?&quot;</p><p>Putting the pieces together</p><p>Composition gives us a way to answer that question.</p><p>Instead of one large component, we can expose smaller pieces:</p><p>A wishlist can choose a different combination:</p><p>Now the consumer controls the structure instead of a growing list of boolean props.</p><p>But flexibility alone isn&#39;t enough.</p><p>If every part invents its own spacing, colors, and typography, the different versions will eventually drift apart.</p><p>That&#39;s where the design token layer comes in.</p><p>The structure can vary while the visual language stays consistent.</p><p>Composition gives flexibility. Tokens provide boundaries.</p><p>Then there&#39;s behavior.</p><p>Favorite state, image selection, and interactions shouldn&#39;t necessarily be tied to one particular visual implementation.</p><p>A headless hook can expose the behavior:</p><pre>const selectedImage, selectImage, isFavorite,<br>toggleFavorite} = useProductCard(product);</pre><p>The search page can decide how that behavior looks.<br>The wishlist can decide something else.</p><p>Compound components can then connect these pieces through shared context when the component becomes complex enough to need it.</p><p>The result isn&#39;t one giant ProductCard.</p><p>It&#39;s a small component system.</p><h4>Where AI fits in</h4><p>This becomes particularly interesting when using AI.</p><p>Today, I can ask an AI coding assistant:</p><pre>&quot;Build a reusable React ProductCard.&quot;</pre><p>Within seconds, I&#39;ll probably get something that works.</p><p>But &quot;works&quot; and &quot;scales&quot; are different things.</p><p>Without architectural constraints, AI may put fetching, state, business logic, styling, and presentation into one component because that is the fastest path to a working result.</p><p>Instead, I would give it the architectural intent first:</p><p><strong>Build a reusable React ProductCard</strong>.</p><ul><li>Use composition instead of a large prop-driven API.</li><li>Use design tokens for visual decisions.</li><li>Separate reusable interaction logic from presentation.</li><li>Use headless behavior where appropriate.</li><li>Use compound components when shared context is needed.</li></ul><p>The component should support search, wishlist, recommendations, and admin use cases.</p><p>Before writing code, explain the proposed architecture<br>and the trade-offs.</p><p>That changes the conversation.</p><p>AI is no longer deciding the architecture for us.</p><p>It&#39;s helping implement the architecture we&#39;ve already reasoned about.</p><p>And I think that&#39;s an important shift in how senior engineers should use AI.</p><p>Don&#39;t just ask AI to write the component. Give it the constraints that define a good component.</p><p>Not every component needs this</p><p>There is a trap here too.</p><p>Once you learn these patterns, it&#39;s tempting to use all of them everywhere.</p><p>I wouldn&#39;t.</p><p>A small component used in one place probably doesn&#39;t need headless behavior or compound components.</p><p>Abstraction has a cost.</p><p>The architecture should earn that cost through reuse, change, or complexity.</p><p>For a product card shared across several experiences, the investment can make sense.</p><p>For a one-off component, it probably doesn&#39;t.</p><p>The goal isn&#39;t to build the most sophisticated ProductCard.</p><p>It&#39;s to build one that doesn&#39;t become painful when the next requirement arrives.</p><p>And AI can help implement all of it, provided we give it the right constraints.</p><p>That&#39;s what I take away from this series.</p><p>A component isn&#39;t truly reusable because you used it twice.</p><p>It&#39;s reusable when its second use doesn&#39;t force you to redesign it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d929e5f099c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Once, Style Everywhere. That’s Headless Components.]]></title>
            <link>https://medium.com/@akshayarangesh18/build-once-style-everywhere-thats-headless-components-69d06f7f4d86?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/69d06f7f4d86</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[headless-now]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Thu, 03 Sep 2026 03:31:01 GMT</pubDate>
            <atom:updated>2026-09-03T05:09:51.058Z</atom:updated>
            <content:encoded><![CDATA[<p>Last week, we solved a different frontend problem:</p><p><strong>How do you keep design decisions consistent as your application grows?</strong></p><p>Design tokens gave us one source of truth.</p><p>But now imagine something else.</p><p>You build a Modal. The behavior is solid.</p><p>It opens. It closes. It handles keyboard interaction. It manages focus.</p><p>Then another team says:</p><p>“We need the same behavior, but our UI needs to look completely different.”</p><p>Do you copy the Modal?</p><p>Do you add 20 props to support every possible design?</p><p>Or create BrandModal, MobileModal, AnimatedModal, and so on?</p><p>We’ve all seen where that goes.</p><p><strong>One behavior. Multiple implementations. Multiple places to fix bugs.</strong></p><p>There’s a better way.</p><p><strong>Separate behavior from presentation.</strong></p><p>That’s the idea behind <strong>headless components</strong>.</p><h3>The Problem: Behavior Gets Trapped in UI</h3><p>A traditional component often combines two things:</p><pre>MODAL<br>               │<br>       ┌───────┴───────┐<br>       ↓               ↓<br>   BEHAVIOR            UI<br>   Open/close        Overlay<br>   Focus             Layout<br>   Keyboard          Animation</pre><p>The problem isn’t that this approach is wrong.</p><p>It works perfectly well when you have <strong>one implementation</strong>.</p><p>The problem appears when multiple teams need the same behavior but different visual experiences.</p><p>Now the UI becomes a container for the behavior.</p><p>To change the design, you end up changing — or copying — the logic too.</p><h3>Headless: Behavior Without a Visual Opinion</h3><p>A headless component flips the relationship.</p><p>Instead of:</p><p><strong>“Here’s a Modal. Use it exactly this way.”</strong></p><p>you provide:</p><p><strong>“Here’s the Modal behavior. Build the UI you need around it.”</strong></p><p>Conceptually:</p><pre>             HEADLESS LOGIC<br>                  │<br>          ┌───────┴───────┐<br>          ↓               ↓<br>       Team A           Team B<br>          │               │<br>      Brand UI        Different UI<br>          │               │<br>          └───────┬───────┘<br>                  ↓<br>          Same behavior</pre><p>The behavior might manage:</p><ul><li>open/close state</li><li>keyboard interaction</li><li>focus management</li><li>selection</li><li>positioning</li><li>accessibility behavior</li></ul><p>The consuming component decides how that behavior should look.</p><p>That’s the important distinction:</p><p><strong>Headless components share behavior, not appearance.</strong></p><h3>One Behavior, Multiple UIs</h3><p>Consider a Tabs component.</p><p>One product might want:</p><pre>[ Overview ] [ Settings ] [ Users ]</pre><p>Another might want:</p><pre>Overview<br>────────<br>Settings<br>Users</pre><p>The visual implementations are completely different.</p><p>But the underlying behavior is the same:</p><p><strong>Which tab is active?</strong></p><p>A headless approach lets you centralize that behavior while allowing each UI to compose it differently.</p><p>So when a bug exists in the behavior, you fix it once.</p><p>You don’t hunt through five copies of the component.</p><h3>Real Example: One Behavior, Four Team UIs</h3><p><strong>Before headless</strong> (copy-paste nightmare):</p><pre>// Modal.jsx (team A)<br>export function Modal({ open, onClose, children }) {<br>  if (!open) return null;<br>  return (<br>  &lt;div className=&quot;modal-overlay&quot; onClick={onClose}&gt;<br>  &lt;div className=&quot;modal-content&quot;&gt;{children}&lt;/div&gt;<br>  &lt;/div&gt;<br>);<br>}<br><br>// BrandModal.jsx (team B copied and changed styles)<br>export function BrandModal({ open, onClose, children }) {<br>  if (!open) return null;<br>  return (<br>  &lt;dialog open={open}&gt;<br>  {children}<br>  &lt;button onClick={onClose}&gt;Close&lt;/button&gt;<br>  &lt;/dialog&gt;<br>  );<br>}<br><br>// ModalAnimated.jsx (team C needs different animation)<br>export function ModalAnimated({ open, onClose, children }) {<br>  if (!open) return null;<br>  return (<br>  &lt;div className=&quot;modal-overlay-animated&quot; onClick={onClose}&gt;<br>  {children}<br>  &lt;/div&gt;<br>);<br>}<br><br>// Bug found: clicking outside should close.<br>// You fix Modal.jsx.<br>// But BrandModal.jsx still has the old behavior.<br>// You fix it there too.<br>// Months later, ModalAnimated has the same bug.<br>// You missed it. Customer finds it.</pre><p><strong>After headless</strong> (behavior once, UI everywhere):</p><pre>// useModalState.js (pure behavior)<br>export function useModalState(initialOpen = false) {<br>   const [open, setOpen] = useState(initialOpen);<br>  return { open, close: () =&gt; setOpen(false) };<br>}<br><br>// ModalTeamA.jsx (team A&#39;s styles)<br>export function ModalTeamA({ children }) {<br>  const { open, close } = useModalState();<br>  if (!open) return null;<br>  return (<br>    &lt;div className=&quot;modal-overlay&quot; onClick={close}&gt;<br>    &lt;div className=&quot;modal-content&quot;&gt;{children}&lt;/div&gt;<br>    &lt;/div&gt;<br>);<br>}<br><br>// ModalTeamB.jsx (team B&#39;s styles, same behavior)<br>export function ModalTeamB({ children }) {<br>  const { open, close } = useModalState();<br>  if (!open) return null;<br>    return (<br>    &lt;dialog open={open}&gt;<br>    {children}<br>    &lt;button onClick={close}&gt;Close&lt;/button&gt;<br>    &lt;/dialog&gt;<br>);<br>}<br><br>// ModalTeamC.jsx (team C&#39;s styles, same behavior)<br>export function ModalTeamC({ children }) {<br>  const { open, close } = useModalState();<br>  if (!open) return null;<br>    return (<br>    &lt;div className=&quot;modal-overlay-animated&quot; onClick={close}&gt;<br>    {children}<br>    &lt;/div&gt;<br>  );<br>}<br>// Bug found: clicking outside should close.<br>// You fix useModalState.js.<br>// All three implementations automatically get the fix.<br>// No duplication. No missed places.</pre><p>This is composition from Article 1 — separating logic from UI — applied specifically to <strong>behavior reuse across teams</strong>.</p><h3>But What About Complex Components?</h3><p>As headless components become more sophisticated, another problem appears:</p><p><strong>How do multiple pieces of the UI share the same state without passing props everywhere?</strong></p><p>This is where <strong>compound components</strong> can help.</p><p>Think of a Modal:</p><pre>Modal<br>├── Header<br>├── Body<br>└── Footer</pre><p>Instead of passing open, onClose, and other state through every level, the parent can provide shared state through Context.</p><p>Each child accesses what it actually needs.</p><p>The result is a cleaner API:</p><pre>&lt;Modal&gt;<br>  &lt;Modal.Header&gt;Delete User&lt;/Modal.Header&gt;<br>  &lt;Modal.Body&gt;Are you sure?&lt;/Modal.Body&gt;<br>  &lt;Modal.Footer&gt;<br>  &lt;button&gt;Cancel&lt;/button&gt;<br>  &lt;button&gt;Delete&lt;/button&gt;<br>  &lt;/Modal.Footer&gt;<br>&lt;/Modal&gt;</pre><p>The important part isn’t the syntax.</p><p>It’s the architecture:</p><p><strong>Behavior is centralized. Composition remains flexible.</strong></p><h3>Don’t Make Everything Headless</h3><p>This is where good architecture needs restraint.</p><p>A Button usually doesn’t need a headless abstraction.</p><p>Neither does a simple Input.</p><p>If there is no meaningful behavior to reuse independently from the UI, headless architecture can simply add complexity.</p><p>It becomes valuable when:</p><p><strong>The behavior is complex + multiple consumers need it + their UIs need to differ.</strong></p><p>That’s the real rule.</p><h3>And AI Makes This More Important</h3><p>AI can generate a component very quickly.</p><p>But if you ask:</p><p>“Build me a Tabs component.”</p><p>you may get behavior, markup, styling, state management, and accessibility logic all mixed together.</p><p>Instead, define the architecture first:</p><pre>BEHAVIOR<br>↓<br>useTabsState<br>↓<br>UI / Composition<br>↓<br>Team-specific implementation</pre><p>Then AI can implement each layer.</p><p><strong>You define the boundaries. AI fills in the details.</strong></p><p>That’s an increasingly important engineering skill in an AI-assisted development world.</p><h3>The Bigger Architecture Lesson</h3><p>Look at the progression:</p><p><strong>Article 1 — </strong><a href="https://medium.com/@akshayarangesh18/stop-copy-pasting-components-the-architecture-that-actually-scales-a97f2731b068"><strong>Composition</strong></a></p><p>Separate logic from UI to reduce duplication.</p><p><strong>Article 2 — </strong><a href="https://medium.com/@akshayarangesh18/you-fixed-copy-pasting-now-stop-colors-from-drifting-5af651e6b37e"><strong>Design Tokens</strong></a></p><p>Centralize design decisions to maintain consistency.</p><p><strong>Article 3 — Headless Components</strong></p><p>Separate behavior from presentation so behavior can be reused without forcing one UI.</p><p>Together, they lead to a bigger principle:</p><blockquote><strong><em>Good frontend architecture doesn’t eliminate variation. It makes variation safe.</em></strong></blockquote><p>Teams should be able to build different experiences without accidentally creating different versions of the same underlying behavior.</p><p>That’s what headless components give you.</p><p><strong>Build once. Let the UI be yours.</strong></p><p><em>Next: How do you bring composition, tokens, and headless components together when building a real feature?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69d06f7f4d86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You Fixed Copy-Pasting. Now Stop Colors From Drifting]]></title>
            <link>https://medium.com/@akshayarangesh18/you-fixed-copy-pasting-now-stop-colors-from-drifting-5af651e6b37e?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/5af651e6b37e</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Mon, 31 Aug 2026 03:31:01 GMT</pubDate>
            <atom:updated>2026-08-31T03:31:01.287Z</atom:updated>
            <content:encoded><![CDATA[<p>In last article, we solved one frontend problem: <strong>copy-pasting components</strong>.</p><p>Build a Button once. Reuse it everywhere.</p><p>Great.</p><p>But then your application grows.</p><p>You now have hundreds of components, multiple teams, and one surprisingly difficult question:</p><p><strong>What exactly is “brand blue”?</strong></p><p>Search your codebase and you might find:</p><p>#0066CC<br>#0073E6<br>rgb(0, 102, 204)<br>…and several other variations.</p><p>Nobody intentionally created a mess.</p><p>Each engineer simply solved the problem in front of them.</p><p>That is how consistency breaks at scale.</p><p>And this is where <strong>design tokens</strong> become more than a styling technique.</p><p>They become an architectural decision.</p><h3>Consistency Should Be a System Property</h3><p>A common approach is to define design values directly inside components.</p><pre>Button → blue<br>Card → slightly different blue<br>Header → another blue<br>Admin → old blue</pre><p>Now imagine your company decides to change its primary brand color.</p><p>Without a system, the process looks like this:</p><pre>47 components<br>     ↓<br>Search the codebase<br>     ↓<br>Update values<br>     ↓<br>Test everything<br>     ↓<br>Find the places you missed<br>     ↓<br>Fix them</pre><p>That’s not a CSS problem.</p><p><strong>It’s a system-design problem.</strong></p><p>A better approach is:</p><pre><br>            DESIGN TOKENS<br>                   │<br>        ┌──────────┼──────────┐<br>        ↓          ↓          ↓<br>     Button       Card       Header<br>        │          │           │<br>        └──────────┼───────────┘<br>                   ↓<br>            Consistent UI</pre><p>One decision. Many consumers.</p><h3>Design Tokens: One Source of Truth</h3><p>A design token is simply a named design decision.</p><p>Instead of:</p><pre>background: #0066CC;<br>padding: 16px;</pre><p>you have:</p><pre>background: var(--color-primary);<br>padding: var(--spacing-md);</pre><p>And somewhere central:</p><pre>:root {<br>  --color-primary: #0066CC;<br>  --color-background: #F9FAFB;<br>  --color-text: #111827;<br><br>  --spacing-sm: 8px;<br>  --spacing-md: 16px;<br>  --spacing-lg: 24px;<br>}</pre><p>Now when the brand changes, you change the token.</p><p>The components don’t need to know why.</p><p>They simply consume the decision.</p><p><strong>That’s the real value of tokens: not fewer lines of CSS, but fewer opportunities for inconsistency.</strong></p><h3>Global Doesn’t Mean Everything Is Global</h3><p>This is where token systems often go wrong.</p><p>Not every value needs to become a global token.</p><p>Think in two layers:</p><pre><strong>GLOBAL TOKENS</strong><br>Brand colors<br>Spacing<br>Typography<br>       │<br>       ↓<br><strong>COMPONENT TOKENS<br></strong>Hover behavior<br>Local shadows<br>Component-specific sizing<br>       │<br>       ↓<br><strong>COMPONENT</strong><br>Button / Card / Modal</pre><p>Global tokens represent decisions shared across the system.</p><p>Local tokens represent behavior specific to a component.</p><p>The mistake is allowing a component to silently redefine a global decision.</p><p>If every Button can redefine --color-primary, you&#39;ve recreated the original problem—just with more abstraction.</p><h3>Don’t Build the System Before You Need It</h3><p>Another common mistake is over-engineering.</p><p>You have eight components, so you create:</p><p><strong>Atoms → Molecules → Organisms → Templates → Pages</strong></p><p>Now the team spends more time deciding where components belong than building them.</p><p>Architecture should solve a problem that actually exists.</p><p>Start with a small token foundation.</p><p>Then grow the structure when the number of components and teams makes organization genuinely difficult.</p><p><strong>The goal isn’t to create the most sophisticated design system.</strong></p><p>It’s to create the smallest system that keeps the organization consistent.</p><h3>And Then AI Changes the Equation</h3><p>There’s another reason tokens matter now.</p><p>AI can generate a component in seconds.</p><p>But if you simply ask:</p><blockquote><em>“Build me a nice Button.”</em></blockquote><p>AI can invent colors, spacing, shadows and patterns that don’t belong to your system.</p><p>Instead, give it constraints:</p><pre>Use our existing design tokens.<br>Do not introduce new colors.<br>Use existing spacing tokens.<br>Create primary and secondary variants.</pre><p>Now AI becomes an implementation tool <strong>inside your architecture</strong>, rather than a source of new inconsistencies.</p><p>The pattern is simple:</p><p><strong>You define the system → AI follows the system → you review the result.</strong></p><p>The system comes first.</p><h3>The Bigger Architecture Lesson</h3><p>This is the progression I look for when designing frontend platforms:</p><p><strong>Composition</strong> prevents duplicated components.</p><p><strong>Design tokens</strong> prevent duplicated design decisions.</p><p><strong>Structure</strong> makes a growing component library discoverable.</p><p>And the deeper principle is:</p><blockquote><strong><em>Don’t rely on engineers remembering the rules. Build the rules into the system.</em></strong></blockquote><p>That’s how frontend architecture scales from a handful of engineers to dozens of teams.</p><p>And once consistency is solved, another problem appears:</p><p><strong>How do you reuse behavior without forcing everyone to use the same visual implementation?</strong></p><p>That’s where <strong>headless components</strong> come in.</p><p><em>Next: Build Once, Style Everywhere.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5af651e6b37e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Copy-Pasting Components: The Architecture That Actually Scales]]></title>
            <link>https://medium.com/@akshayarangesh18/stop-copy-pasting-components-the-architecture-that-actually-scales-a97f2731b068?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/a97f2731b068</guid>
            <category><![CDATA[componentarchitecture]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[scaleup]]></category>
            <category><![CDATA[frontend-engineering]]></category>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Sat, 11 Jul 2026 04:31:03 GMT</pubDate>
            <atom:updated>2026-07-11T04:31:03.933Z</atom:updated>
            <content:encoded><![CDATA[<p>You have a button component. It works. Three months later, you need a button that’s slightly different — maybe it has an icon on the left, or it’s slightly wider. So you copy the button component, make the change, rename it ButtonWithIcon, commit it, move on.</p><p>Six months later, a bug is found in the original button. You fix it. Then you realize: that bug probably exists in ButtonWithIcon too. And ButtonVariant2. And ButtonSmall. And that thing you wrote last year that you forgot about.</p><p>This is when you realize: you don’t have a button component. You have buttons. Plural. Broken ones.</p><p>If you’ve built a frontend platform serving hundreds of customers, you’ve lived this. By the time you’ve accumulated 2000+ components, you’re not building anymore — you’re managing chaos.</p><p>This article is about why that happens and how to stop it.</p><h3>The Problem Isn’t Laziness</h3><p>First, let’s be honest: copy-pasting components isn’t laziness. It’s the rational move when you’re trying to ship fast.</p><p>When you need a button with an icon and the existing button doesn’t have one, copying takes 5 minutes. Redesigning the abstraction takes 2 hours. When your release is tomorrow, you copy.</p><p>That’s fine once. It becomes a problem when “once” happens a thousand times.</p><p>At scale, I watched this pattern create real problems:</p><ul><li>Defect fixes became detective work (which button variants have this bug?)</li><li>Bundle size grew from duplicate code everywhere</li><li>New engineers couldn’t figure out which button to use</li><li>Performance issues appeared randomly because one variant was memoized, another wasn’t</li></ul><p>The cost of copy-paste compounds. It starts small. Then one day you’re fixing the same bug in twelve places and wondering how this happened.</p><h3>Why Component Abstraction Fails</h3><p>Here’s the thing that most guides won’t tell you: the traditional answer to this problem doesn’t work at enterprise scale.</p><p>The textbook solution is simple: “Make components more flexible. Add props.”</p><pre>// Before (multiple buttons)<br>&lt;Button label=&quot;Click me&quot; /&gt;<br>&lt;ButtonWithIcon icon={Plus} label=&quot;Add item&quot; /&gt;<br>&lt;ButtonSmall label=&quot;Cancel&quot; /&gt;</pre><pre>// After (one flexible button)<br>&lt;Button <br>  label=&quot;Click me&quot; <br>  icon={Plus}<br>  size=&quot;small&quot;<br>  variant=&quot;secondary&quot;<br>/&gt;</pre><p>This works. For a while. Until you have 40 props and half the codebase has no idea which combinations are valid.</p><p>I learned this the hard way. We tried this approach when we had ~400 components. We thought: “Let’s just prop-ify everything.”</p><p>By the time we got to 800 components, the button component had 23 props. onClick, icon, size, variant, loading, disabled, fullWidth, tone, emphasis, and more. New engineers would copy the component file just to figure out which props were required.</p><p>Worse: the props weren’t the real problem. The real problem was that we had buttons built for four different use cases — navigation, form submission, modal triggers, and async actions — all pretending to be one thing.</p><h3>The Real Solution: Composition Over Configuration</h3><p>The breakthrough came when we stopped thinking “how do we make one button do everything” and started thinking “how do we make buttons composable.”</p><p>Here’s what changed:</p><p>Instead of a button with 23 props, we built:</p><ul><li>A minimal &lt;Button&gt; core (handles click, disabled, loading states)</li><li>Separate concerns layered on top (Icon, Label, Badge, Tooltip)</li><li>A clear rule: buttons are containers for content, not containers for logic</li></ul><pre>// Instead of Button with 23 props<br>&lt;Button <br>  icon={CheckIcon}<br>  loading={isSubmitting}<br>  onClick={submit}<br>  tone=&quot;success&quot;<br>&gt;<br>  Submit Form<br>&lt;/Button&gt;</pre><pre>// We built button as a layout layer<br>&lt;Button onClick={submit} loading={isSubmitting}&gt;<br>  &lt;Icon name={CheckIcon} /&gt;<br>  &lt;Label&gt;Submit Form&lt;/Label&gt;<br>&lt;/Button&gt;</pre><p>This seems like more code. It’s actually less.</p><p>Why? Because now Icon and Label are independent components used everywhere. The Button doesn’t need to know about icons. The Icon doesn’t need to know about buttons. They compose.</p><p>When we needed a button with a tooltip, we didn’t add a tooltip prop to Button. We composed:</p><pre>&lt;Tooltip text=&quot;Save your progress&quot;&gt;<br>  &lt;Button onClick={save}&gt;<br>    &lt;Icon name={SaveIcon} /&gt;<br>    &lt;Label&gt;Save&lt;/Label&gt;<br>  &lt;/Button&gt;<br>&lt;/Tooltip&gt;</pre><p>The Button doesn’t change. We didn’t add a prop. We composed existing components.</p><h3>What This Actually Looks Like at Scale</h3><p>When we restructured around composition, here’s what happened:</p><p><strong>Bundle size:</strong> We went from duplicate button logic across 12 variants to one core button everywhere. The redundancy was real — removing it mattered.</p><p><strong>Defect management:</strong> Bug in button’s click handler? One fix. It applied everywhere. No variants, no hunting. What took 2–3 weeks of debugging now took one focused fix.</p><p><strong>New engineer onboarding:</strong> “How do I make a button with an icon?” went from a 30-minute question to: “Use Button, add an Icon inside.” Obvious. No searching for which variant to copy.</p><p><strong>Maintenance:</strong> Fewer button variants meant fewer places for bugs to hide. We stopped chasing the same bug across seven different component files.</p><p>The numbers sound big, but the principle is simple: when a component does one thing well and composes with others, you maintain less code and fix bugs faster.</p><h3>What People Get Wrong About This</h3><p>Most engineers hear “use composition” and think it means “write more code.” It doesn’t.</p><p>Composition actually reduces code because you stop building the same logic in seventeen places. A button with an icon, a card with an icon, a list item with an icon — they all use the same Icon component.</p><p>The confusion comes from conflating two different things:</p><ol><li><strong>Internal complexity</strong> (how complex the component is to build): Composition can add this. A button that accepts children is slightly more complex than a button with 5 hardcoded props.</li><li><strong>System complexity</strong> (how hard your codebase is to maintain): Composition reduces this. Dramatically.</li></ol><p>People optimize for #1 and ignore #2. That’s the mistake.</p><p>Another misconception: “Composition means more re-renders.” It doesn’t. Use React.memo on components that don&#39;t change their children. That&#39;s it.</p><p>The real insight: <strong>A platform component’s job isn’t to handle every case. It’s to handle one case well and compose with others.</strong></p><h3>The Rule</h3><p>Copy once. Refactor twice. By the third time you’re copying the same logic, extract it. Compose it. Move on.</p><h3>One Takeaway</h3><p>Next time you’re about to copy a component, ask: “Is this new, or a variation?”</p><p>If new, copy. If variation, extract. That’s the difference between shipping confidently and shipping fear.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a97f2731b068" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI vs ML vs Deep Learning vs GenAI: Explained Simply]]></title>
            <link>https://medium.com/@akshayarangesh18/ai-vs-ml-vs-deep-learning-vs-genai-explained-simply-4f79bbd4e223?source=rss-e34591588119------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f79bbd4e223</guid>
            <dc:creator><![CDATA[Akshaya Rangesh]]></dc:creator>
            <pubDate>Tue, 06 May 2025 08:57:43 GMT</pubDate>
            <atom:updated>2025-05-06T08:57:43.534Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*34Tg0VWMclhzUv6XM3AczA.png" /></figure><h3>AI, ML, Deep Learning, GenAI &amp; LLMs: What’s the Difference?</h3><p>If you’ve been reading about tech lately, you’ve probably come across terms like <em>AI</em>, <em>machine learning</em>, <em>deep learning</em>, <em>Generative AI</em>, and <em>LLMs</em>. They’re often used interchangeably, but they don’t mean the same thing.</p><p>In this article, we’ll break down these concepts in a simple, jargon-free way — so you can understand what’s what, how they’re connected, and where tools like ChatGPT fit in.</p><h3>🔍 1. AI (Artificial Intelligence): The Big Umbrella</h3><p><strong>What is it?</strong><br> AI is a broad field focused on making machines think or act like humans. It includes everything from rule-based systems to advanced learning algorithms.</p><p><strong>Examples:</strong></p><ul><li>Virtual assistants like Siri or Alexa</li><li>Chess-playing computers</li><li>Smart thermostats</li></ul><p><strong>Analogy:</strong> Think of AI like <em>“vehicles”</em>. It’s the broadest category that includes many types — cars, bikes, trucks, and more.</p><h3>🤖 2. ML (Machine Learning): A Subset of AI</h3><p><strong>What is it?</strong><br> ML is a technique within AI where machines learn from data. Instead of being explicitly programmed, they identify patterns and improve over time.</p><p><strong>Examples:</strong></p><ul><li>Spam filters in email</li><li>Product recommendations on Amazon</li><li>Credit card fraud detection</li></ul><p><strong>Analogy:</strong> If AI is “vehicles”, ML is “cars” — a more specific type.</p><h3>🧠 3. Deep Learning: A Subset of ML</h3><p><strong>What is it?</strong><br> Deep Learning uses layered neural networks that mimic how the human brain processes information. It’s powerful for tasks involving vision, speech, and complex data.</p><p><strong>Examples:</strong></p><ul><li>Face recognition in photos</li><li>Voice assistants like Google Assistant</li><li>Self-driving car perception systems</li></ul><p><strong>Analogy:</strong> Deep learning is like a <em>“self-driving car”</em> — a sophisticated, high-powered version of machine learning.</p><h3>🎨 4. Generative AI (GenAI): AI That Creates</h3><p><strong>What is it?</strong><br> GenAI is AI that can generate new content — like text, images, music, or even code.</p><p><strong>Examples:</strong></p><ul><li>ChatGPT (text)</li><li>DALL·E (images)</li><li>GitHub Copilot (code)</li></ul><p><strong>Analogy:</strong> GenAI is like an <em>artist</em> — not just recognizing, but creating.</p><h3>📚 5. LLM (Large Language Models): The Engine Behind GenAI</h3><p><strong>What is it?</strong><br> LLMs are a type of deep learning model trained on massive text datasets. They predict and generate human-like language.</p><p><strong>Examples:</strong></p><ul><li>GPT-4 (OpenAI)</li><li>Claude (Anthropic)</li><li>Gemini (Google)</li></ul><p><strong>Relation to GenAI:</strong> LLMs power text-based GenAI tools like ChatGPT. Think of them as the <em>brain</em> that generates the content.</p><p><strong><em>Got questions or thoughts?</em></strong><em> Feel free to leave a comment below — I’d love to hear from you and continue the conversation!</em></p><p><em>#ArtificialIntelligence #MachineLearning #DeepLearning #GenerativeAI #LargeLanguageModels #TechExplained #AIForBeginners #GenAI #AICommunity #TechTrends #AIApplications</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f79bbd4e223" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>