<?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 Sarah Gentil on Medium]]></title>
        <description><![CDATA[Stories by Sarah Gentil on Medium]]></description>
        <link>https://medium.com/@sarahizabelp?source=rss-a19b2612c09------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8aUTxUzypQkEBvvEbp0mtg.jpeg</url>
            <title>Stories by Sarah Gentil on Medium</title>
            <link>https://medium.com/@sarahizabelp?source=rss-a19b2612c09------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 15:34:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarahizabelp/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[Nobody Likes Writing Jira Tickets. So I Automated It.]]></title>
            <link>https://javascript.plainenglish.io/nobody-likes-writing-jira-tickets-so-i-automated-it-c612a485797c?source=rss-a19b2612c09------2</link>
            <guid isPermaLink="false">https://medium.com/p/c612a485797c</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Sarah Gentil]]></dc:creator>
            <pubDate>Fri, 22 May 2026 14:23:23 GMT</pubDate>
            <atom:updated>2026-05-23T02:10:41.679Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IEIzzHopzUYtGQrGLOI11w.png" /></figure><p>Nobody likes writing Jira tickets. Am I right?</p><p>They’re boring, repetitive, and usually written five minutes before sprint planning. 😭</p><p>My backlog used to be a graveyard.<br>Vague titles. Missing acceptance criteria. Tickets that said:</p><blockquote>Create notifications center with unread indicators and mark-as-read functionality.</blockquote><p>But still missed:</p><ul><li>loading states</li><li>empty states</li><li>API failure behavior</li><li>responsive layouts</li><li>accessibility</li><li>optimistic updates</li><li>edge cases</li></ul><p>Engineers would pick up a card, read it twice, then open Slack to ask the obvious questions that should have been in the ticket all along.</p><p>Sound familiar?</p><p>Nobody was lazy. Everyone was overloaded.</p><p>And when you’re overloaded, writing a good ticket is the first thing that gets cut.</p><h3>🏗️ Who Should Actually Be Writing Your Tickets</h3><p>In most teams, the Product Owner (PO) is responsible for shaping and maintaining the backlog.</p><p>That includes refining stories, defining acceptance criteria, clarifying scope, prioritizing work, and helping bridge business needs with engineering execution.</p><p>But in practice?</p><p>It doesn’t always work that way.</p><p>Sometimes the team doesn’t have a dedicated PO.<br>Sometimes the PO is supporting multiple squads.<br>Sometimes product decisions move faster than backlog refinement can keep up.</p><p>And gradually, ticket-writing becomes everyone’s responsibility.</p><p>Which usually means it becomes nobody’s priority 😅</p><p>Engineers end up writing their own tasks.<br>Designers add implementation notes.<br>Tech leads fill missing acceptance criteria five minutes before sprint planning.</p><p>And honestly, that makes sense. The people closest to the technical implementation often <em>do</em> have the best context.</p><p>But they’re also the people trying to ship features, review PRs, fix production bugs, attend meetings, and unblock teammates.</p><p>So ticket quality naturally becomes inconsistent.</p><p>Not because people are bad at their jobs.</p><p>Because backlog refinement is cognitively expensive work that competes with everything else happening in software teams every day.</p><p>This wasn’t a people problem.</p><p>It was workflow debt.</p><p>And repetitive workflow problems are exactly the kind of thing AI is surprisingly good at.</p><h3>🤖 What This Agent Actually Does</h3><p>A Claude Code sub-agent is a specialized AI persona that lives inside your repository as a Markdown file.</p><p>When you invoke it in Claude Code, it takes on that persona, has access to your codebase, and can use MCP tools, including Atlassian’s Jira API.</p><p>The product-owner agent I built does exactly what a PO would do:</p><p>✅ Creates well-structured Jira tasks with clear titles, descriptions, and acceptance criteria<br>✅ Fills required metadata like labels, issue type, and team ownership<br>✅ Writes QA-oriented acceptance criteria focused on observable behavior<br>✅ Breaks feature requests into smaller deliverable tasks<br>✅ Enriches vague or incomplete tickets<br>✅ Flags missing dependencies, blockers, and missing design references</p><p>You describe what you need in plain English.<br>The agent creates the ticket ✨</p><h3>🧠 The Superpower Nobody Talks About: Codebase Context</h3><p>Here’s what makes this genuinely different from just asking ChatGPT to write a ticket.</p><p>Claude Code agents run <em>inside your repository</em>.</p><p>The agent doesn’t just have your prompt.<br>It has access to your actual codebase.</p><p>It can read:</p><ul><li>your file structure</li><li>your naming conventions</li><li>your API patterns</li><li>your component architecture</li><li>your design system usage</li><li>your existing implementation patterns</li></ul><p>That changes <em>everything</em> about ticket quality.</p><p>When I ask the agent to create a task for a new UI feature, it doesn’t generate generic fluff.</p><p>It references the actual patterns already used in the application.</p><p>It knows:</p><ul><li>what libraries the project uses</li><li>how forms are structured</li><li>how API calls are handled</li><li>how loading states are implemented</li><li>how the design system works</li></ul><p>And honestly?</p><p>It catches things humans regularly forget when writing tickets quickly 😬</p><p>Things like:</p><ul><li>loading states</li><li>empty states</li><li>accessibility requirements</li><li>responsive behavior</li><li>optimistic updates</li><li>API error handling</li><li>keyboard navigation</li><li>edge cases</li></ul><p>This isn’t AI autocomplete. This is a context-aware technical teammate that read your entire codebase before sitting down to write.</p><h3>✍️ Before vs After</h3><p>A little taste of the power of this agent.</p><h4>👎 Before using the agent</h4><p><strong>Description:</strong></p><blockquote>Build notifications page</blockquote><p><strong>Acceptance Criteria:</strong></p><ul><li><em>Show notifications</em></li><li><em>Allow marking notifications as read</em></li><li><em>Match Figma design</em></li></ul><h4>👍 After using the agent</h4><p><strong>Description</strong>:</p><blockquote>Implement a notifications page with pagination, unread state indicators, optimistic updates, responsive layouts, loading skeletons, and API error handling following existing design system conventions.</blockquote><p><strong>Acceptance Criteria:</strong></p><ul><li><em>Display paginated notifications ordered by most recent first</em></li><li><em>Show visual unread indicators for unread notifications</em></li><li><em>Allow users to mark notifications as read without page refresh</em></li><li><em>Display loading skeletons while data is being fetched</em></li><li><em>Show an empty state when there are no notifications</em></li><li><em>Display an error state when the API request fails</em></li><li><em>Ensure responsive behavior on tablet and desktop layouts</em></li><li><em>Match the latest approved Figma designs</em></li><li><em>Ensure keyboard navigation and screen reader accessibility support</em></li></ul><p>The difference isn’t just “better wording”.<br>Humans writing tickets under pressure usually forget:</p><ul><li>edge cases</li><li>loading states</li><li>accessibility</li><li>responsive behavior</li><li>failure scenarios</li></ul><p>Not because they’re bad engineers.<br>Because humans optimize for “good enough” when they’re overloaded.</p><p>AI doesn’t get tired halfway through writing acceptance criteria 💀</p><h3>🧠 Keeping the Context Fresh: CLAUDE.md + Agent Memory</h3><p>To make sure the agent is always working with up-to-date project knowledge, there are two mechanisms you should set up:</p><h4>📄 CLAUDE.md</h4><p>CLAUDE.md is a special file at the root of your project that Claude Code automatically loads into every session.</p><p>It’s where you put the things Claude should always know: your tech stack, conventions, important file paths, team preferences, and architecture notes.</p><p>Think of it as an onboarding document the agent reads before every conversation.</p><p>Keep it focused and current.</p><p>Whenever your stack changes, update the CLAUDE.md too.</p><h4>Agent Memory</h4><p>Agent memory is a persistent directory at:</p><p>.claude/agent-memory/product-owner/</p><p>This is where the agent stores what it learns across sessions:</p><ul><li>confirmed project patterns</li><li>recurring mistakes to avoid</li><li>team-specific conventions</li><li>preferred ticket structures</li></ul><p>Because these are just files inside your repository, they’re version-controlled.</p><p>The whole team benefits from what the agent learns over time.</p><p>Together, these two mechanisms mean the agent gets smarter the longer it’s been working in your project.</p><p>It’s not starting from zero every session.</p><h3>🛠️ Before You Start: What You’ll Need</h3><p>✅ Claude Code installed (npm install -g @anthropic-ai/claude-code)<br>✅ A Jira project with API access<br>✅ An Atlassian account with permission to create/edit issues<br>✅ Node.js 18+</p><p>That’s it.</p><h3>⚙️ Step 1: Connect the Atlassian MCP Server</h3><p>Claude Code can connect directly to Jira through Atlassian’s MCP server.</p><p>Run this in your terminal:</p><pre>✅ Claude Code installed (npm install -g @anthropic-ai/claude-code)<br>✅A Jira project with API access<br>✅An Atlassian account with permission to create/edit issues<br>✅Node.js 18+</pre><p>Then authenticate:</p><ul><li>Run claude in your terminal (or open the Claude panel in VS Code)</li><li>Type /mcp in the chat input</li><li>Select atlassian - authenticate</li><li>A browser window opens</li><li>Log in with your Atlassian account</li></ul><p>Verify it’s connected:</p><pre>claude mcp list</pre><p>You should see atlassian listed ✅</p><p>You’re done.</p><blockquote>💡 Pro tip: the Atlassian MCP server uses OAuth, so you only need to authenticate once per machine.</blockquote><h3>📝 Step 2: Create the Agent File</h3><p>Every Claude Code sub-agent lives at: .claude/agents/&lt;name&gt;.md inside your repository.</p><p>The file has two parts:</p><ul><li>YAML frontmatter for metadata</li><li>a Markdown body that acts as the agent’s system prompt</li></ul><p>Here’s the funny part:</p><p>You don’t even need to write this file yourself. 😂</p><p>Ask Claude to create it for you. Seriously.</p><p>This is exactly how I built mine.</p><p>Something like this works pretty well:</p><pre>Create a Claude Code sub-agent file at .claude/agents/product-owner.md.<br><br>This agent manages our Jira backlog. It should:<br>- Create tasks (not stories) with clear titles and descriptions<br>- Write QA-oriented acceptance criteria that describe observable behavior, <br> not implementation details<br>- Fill required Jira fields: label (Frontend or Backend), team (our team name),<br> issue type (Task, Bug, or Spike)<br>- Use Atlassian MCP to create and edit tickets directly<br>- Reference our Figma designs when creating UI tasks: [your Figma URL here]<br>- Follow our tech stack: [Next.js, TypeScript, etc.]<br>- Use Atlassian Document Format (ADF) for Jira descriptions so they render <br> correctly<br><br>The agent should be direct and act immediately on clear requests.<br>No preamble, no confirmation for simple tasks.</pre><p>Claude generates a pretty solid starting point. From there, you iterate. And that’s actually the important part.</p><p>The first version will miss things.</p><p>👉 Use it on real tickets. <br>👉 Observe what feels wrong. <br>👉 Improve the prompt.</p><p><strong>Remember:</strong> the agent file lives in your repository. Every improvement is a PR. Every teammate who refines it makes it better for everyone.</p><p>Over time, the agent becomes ridiculously good. Not because the model changed. Because your team collectively taught it what good looks like. 🔥</p><h3>🎯 Step 3: Give the Agent Context That Actually Matters</h3><p>A generic agent writes generic tickets.</p><p><strong><em>Specificity is everything.</em></strong></p><p>Things worth adding to your agent file:</p><p>✅ Your acceptance criteria format<br>✅ Required Jira metadata<br>✅ Your naming conventions<br>✅ Your tech stack<br>✅ Your definition of a “good” ticket title</p><p>And inside your CLAUDE.md:</p><p>✅ Current Figma URLs<br>✅ Monorepo structure<br>✅ Package naming patterns<br>✅ Team terminology<br>✅ Architectural decisions</p><p>This context is what separates a ticket that says:</p><blockquote>Build user settings page</blockquote><p>from one that says:</p><blockquote>Implement a user settings page with form validation, loading and error states, responsive layouts, unsaved changes warnings, and accessibility support following existing application patterns.</blockquote><p>Same feature request.<br>Completely different ticket quality ✨</p><h3>💬 How to Use the Agent</h3><p>Once the file is in place, usage becomes ridiculously simple.</p><p>Examples:</p><pre>Use product-owner to create a Frontend task for a notifications center with <br>unread indicators and real-time updates.</pre><pre>Use product-owner to add acceptance criteria to AUTH-142.<br>The task is about implementing password reset validation.</pre><pre>Use product-owner to break down the onboarding flow into separate frontend <br>and backend tasks.</pre><pre>Use product-owner to review the current backlog and identify missing tasks <br>for the billing feature.</pre><p>Claude Code recognises when a request matches the agent description and routes it automatically.</p><p>One thing worth knowing: <strong><em>the richer your prompt, the better the ticket.</em></strong></p><p>The examples above are minimal on purpose. But in practice, you can dump everything you know into the prompt. <strong>Business context, design decisions, technical constraints, edge cases you already thought of, API endpoints involved, related tickets.</strong> The agent will use all of it.</p><p>And if your team uses the Figma MCP, you can go even further. Reference specific screens directly in your prompt, drop screenshots, paste design links. The agent will pull visual context into the ticket description automatically.</p><p>The difference between a good ticket and a great ticket is often just how much context you gave upfront.</p><h3>😮 The Part That Surprised Me</h3><p>I built this expecting to save time.</p><p>What I didn’t expect was how much it improved collaboration quality.</p><p>When tickets are consistently well-written, with clear scope, proper metadata, complete acceptance criteria, and technical context already included, something changes.</p><p><strong>❤️ </strong>Engineers spend less time asking clarifying questions.<br><strong>❤️ </strong>Standups get shorter.<strong><br>❤️ </strong>PRs get smaller.<strong><br>❤️ </strong>QA catches fewer surprises.</p><p>It stopped feeling like “an AI tool”.</p><p>It felt like having a very experienced technical PM embedded directly inside the engineering team. One that had already read the entire codebase before writing the ticket.😅</p><p>And unlike humans, the agent:</p><ul><li>doesn’t get tired on Fridays.</li><li>doesn’t forget labels.</li><li>doesn’t skip acceptance criteria because production is on fire.</li></ul><h3>⚠️ Where This Breaks</h3><p>I want to be honest about where this approach falls apart.</p><h4>❌ If nobody reviews the output</h4><p>The agent acts immediately.<br>If nobody sanity-checks the created tickets, mistakes go directly into the backlog.</p><p>Always review the output. <strong><em>Always.</em></strong></p><h4>❌ If your Figma files are outdated</h4><p>The agent references your designs when generating UI tasks.</p><p>If your design links are stale, the generated tickets will also be stale 😬</p><p>Keep them updated.</p><h4>❌If your agent file is vague</h4><p><em>“Write good tickets”</em> is not a useful instruction.</p><p>The more specific the prompt, the better the results.</p><h4>❌If your workflows are extremely custom</h4><p>This setup works best for relatively standard Jira workflows.</p><p>Heavy customization usually requires additional iteration.</p><h4>❌If you expect the agent to understand business priorities</h4><p>The agent understands your codebase.</p><p>It does <em>not</em> understand:</p><ul><li>roadmap priorities</li><li>stakeholder politics</li><li>business strategy</li><li>product trade-offs</li></ul><p>Humans still matter.<br><em>A lot.</em></p><h3>✅ Final Checklist Before You Start</h3><p>Ask yourself:</p><ul><li>Do I have a CLAUDE.md documenting my stack and conventions?</li><li>What Jira fields are required in my workflow?</li><li>What does “good acceptance criteria” mean in my team?</li><li>Who on the team will help evolve the agent over time?</li></ul><p>If you answer those questions upfront, the entire setup takes less than an hour ⏱️</p><p>And honestly?</p><p>The first ticket it creates will probably already be better than half the backlog you currently have 😎</p><h3>💙 Final Thought</h3><p>This is the setup we ended up building for our team, and honestly, it’s been working surprisingly well so far.</p><p>One Markdown file. One MCP connection. Less than an hour to set up.</p><p>That’s the entire setup. And yet it changed something real about how our team works, not just how fast we work.</p><p>Hopefully this article helps someone save a few hours of backlog pain ✨</p><p>Try it. Break it. Make it yours. 🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c612a485797c" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/nobody-likes-writing-jira-tickets-so-i-automated-it-c612a485797c">Nobody Likes Writing Jira Tickets. So I Automated It.</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Happened to CSS-in-JS]]></title>
            <link>https://javascript.plainenglish.io/what-happened-to-css-in-js-3140065cc649?source=rss-a19b2612c09------2</link>
            <guid isPermaLink="false">https://medium.com/p/3140065cc649</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Sarah Gentil]]></dc:creator>
            <pubDate>Fri, 13 Mar 2026 18:25:41 GMT</pubDate>
            <atom:updated>2026-03-13T18:25:41.267Z</atom:updated>
            <content:encoded><![CDATA[<h4>styled-components didn’t die. It got left behind.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3YrSyzN-m6Smty2mueP52g.png" /></figure><p>I still remember the first time a styled-component clicked for me.</p><p>Not the syntax. The <em>feeling</em>.</p><p>A button with its styles right there, next to its logic, next to its props. No separate file. No class name to invent. No wondering where .btn-primary-hover-active was defined and whether changing it would break something three directories away.</p><p>It felt like the missing piece. Like CSS had finally grown up.</p><p>That was 2019. I spent the next four years writing styled-components and Emotion like they were the obvious choice. The whole industry was. And it made sense.</p><p>And then, quietly, they stopped being the future.</p><h3>Why It Made Sense</h3><p>To understand what happened, you have to remember what CSS was like before.</p><p>Global scope. Class name collisions. Styles defined in one file, applied in another, overridden in a third. Specificity wars. The !important graveyard. Opening a 3,000-line CSS file and having no idea which parts were still being used.</p><p>CSS-in-JS solved real problems.</p><p><strong>Colocation.</strong> Styles lived with the component that used them. Delete the component, the styles went with it. No orphaned CSS accumulating in a stylesheet nobody dared touch.</p><p><strong>Scoping.</strong> Auto-generated class names meant no collisions. Ever. You could write .button in a hundred components and they&#39;d never interfere.</p><p><strong>Dynamic styles.</strong> Props-driven styling was genuinely powerful.</p><pre>const Button = styled.button&lt;{ $primary?: boolean }&gt;`<br>  background: ${props =&gt; props.$primary ? &#39;#0070f3&#39; : &#39;transparent&#39;};<br>  color: ${props =&gt; props.$primary ? &#39;white&#39; : &#39;#0070f3&#39;};<br>  padding: 0.5rem 1.25rem;<br>  border-radius: 6px;<br>`;</pre><p>No conditional className strings. No clsx juggling. Just props and styles, wired together directly.</p><p><strong>Theming.</strong> One ThemeProvider and every component in your tree had access to your design tokens. Change the theme, every styled-component updated. It felt like magic.</p><p>These weren’t minor conveniences. They were real solutions to real pain. The adoption wasn’t hype, developers voting with their codebases.</p><h3>The Cracks That Were Always There</h3><p>None of this was free.</p><p>Every styled-component had a runtime cost. When your component rendered, the library generated a class name, injected a &lt;style&gt; tag into the &lt;head&gt;, and tracked the mapping. On every render. For every component.</p><p>On small apps, you didn’t feel it. On large apps, ones with hundreds of styled-components, complex theming, frequent re-renders, you started to.</p><p>The hydration story was uncomfortable too. SSR apps had to serialize styles into the HTML, ship them to the client, and then reconcile. Extra weight. Extra complexity. A ServerStyleSheet wrapper that felt like plumbing that shouldn&#39;t exist.</p><p>Bundle size crept up. Emotion was lighter than styled-components, which is partly why I switched to it on newer projects. But lighter is not the same as free.</p><p>We accepted these tradeoffs because the alternatives (BEM, CSS Modules, raw stylesheets) felt like going backwards. The DX was worse. The colocation was gone. The dynamic styling required more ceremony.</p><p>So we paid the runtime cost and called it worth it.</p><p>For a while, it was.</p><h3>Then React Changed the Rules</h3><p>React Server Components didn’t just add a new rendering model. They invalidated a foundational assumption that CSS-in-JS was built on.</p><p>The assumption: styles are generated at runtime, on the client, where JavaScript runs.</p><p>RSC flipped that. Server Components run on the server, render once, and send HTML. There’s no JavaScript context. No React lifecycle. No hooks.</p><p>And both styled-components and Emotion depend on the Context API to share theme values across the component tree. Context doesn’t exist in Server Components.</p><p>It’s not a missing feature. It’s an architectural incompatibility. 🚧</p><pre>// This breaks in a Server Component<br>import styled from &#39;styled-components&#39;;<br><br>// styled-components needs React context to inject styles.<br>// Server Components don&#39;t have it.<br>const Title = styled.h1`<br>  color: ${props =&gt; props.theme.colors.primary};<br>`;</pre><p>There’s no clean workaround. You can scatter &#39;use client&#39; directives to push every styled component back to the client, but then you&#39;ve lost the benefits of RSC. You&#39;re opting entire subtrees out of server rendering to keep your styling library working.</p><p>That’s not a migration path. That’s a retreat.</p><h3>The Maintenance Mode Moment</h3><p>On March 17, 2025, Evan Jacobs, styled-components’ maintainer for the last several years, made it official.</p><p>Maintenance mode. No new features. Critical bugs only.</p><p>The announcement was direct. He no longer uses styled-components in production. The library won’t work in React Server Components without &#39;use client&#39; directives everywhere. The ecosystem has moved on.</p><p>This part hit differently than I expected:</p><blockquote>“For new projects, I would not recommend adopting styled-components.”</blockquote><p>That sentence, from the person who maintained it. Clear. Direct. Honest.</p><p>Emotion hasn’t made a formal announcement, but the picture isn’t different. The same architectural dependency on Context. The same incompatibility with RSC. The same slow drift toward irrelevance in new projects, even as existing codebases keep running.</p><p>Material UI, downloaded around 5 million times a week, announced it would eventually drop Emotion in favor of Pigment CSS, a zero-runtime alternative. That transition has moved slowly. But the direction is set.</p><h3>Who’s Still There (And Why)</h3><p>Here’s the part nobody talks about: styled-components is still growing.</p><p>In early 2026, it’s downloaded around 8 million times a week. Up from 6 million in 2023.</p><p>That number needs context. Most of those downloads are existing projects. CI pipelines. Teams maintaining codebases that were built in 2021 and aren’t being rewritten. Companies that made a bet on styled-components and aren’t migrating because there’s no business case to do so.</p><p>The library didn’t fail. It became infrastructure for a specific era of React: the client-rendered, hooks-and-context era. That era is enormous. Billions of lines of code. It’s not going away.</p><p>If you’re building a new project today, styled-components isn’t on the list. But if you’re maintaining an existing app that works, that runs fast enough, that your team knows deeply. There’s no emergency.</p><p>The mistake is treating this as binary: either “CSS-in-JS is dead” or “CSS-in-JS is fine.” Both are wrong. The truth is: it’s finished for new projects, and stable for old ones.</p><h3>Where Things Are Heading</h3><p>The zero-runtime libraries have been waiting for this moment.</p><p><strong>Linaria</strong> compiles CSS-in-JS to static CSS files at build time. The styled API looks familiar. The runtime cost is zero. The RSC compatibility is real. Styles are just CSS by the time they reach the browser.</p><pre>import { styled } from &#39;@linaria/react&#39;;<br><br>const Button = styled.button`<br>  background: var(--color-primary);<br>  padding: 0.5rem 1.25rem;<br>  border-radius: 6px;<br>`;</pre><p>The catch: dynamic props based on JavaScript values don’t work. If your styling depends on runtime data, you need CSS custom properties instead of direct interpolations. Different mental model. Not always worse. Just different.</p><p><strong>vanilla-extract</strong> takes a harder stance. Styles are written in TypeScript files, compiled to CSS at build time, and completely static. Type-safe design tokens, zero runtime, RSC-compatible.</p><pre>// button.css.ts<br>import { style } from &#39;@vanilla-extract/css&#39;;<br><br>export const button = style({<br>  background: &#39;var(--color-primary)&#39;,<br>  padding: &#39;0.5rem 1.25rem&#39;,<br>  borderRadius: &#39;6px&#39;,<br>});</pre><p>It’s more verbose than styled-components. The DX is different. But it’s the architecture that survives RSC.</p><p><strong>CSS Modules</strong>, which never went away, are having a quiet resurgence. No library. No runtime. Scoped class names via build tooling. Boring in the best way.</p><p>And for new projects with no legacy constraints: plain CSS, which is better than it’s ever been.</p><h3>What We Lost</h3><p>I want to be honest about this part.</p><p>No current alternative fully replaces the developer experience of styled-components at its best.</p><p>The props-driven dynamic styling is genuinely harder now. Instead of:</p><pre>const Box = styled.div&lt;{ $spacing: number }&gt;`<br>  padding: ${props =&gt; props.$spacing * 4}px;<br>`;</pre><p>You’re writing CSS custom properties and managing the mapping manually. It works. It’s correct. It’s not as elegant.</p><p>The theming story is messier. ThemeProvider was a clean API. Replacing it with CSS custom properties and design token files is more configuration for less magic.</p><p>And the colocation (styles and component logic in the same file) is gone if you’re using CSS Modules or vanilla-extract. Not a dealbreaker. But a real loss.</p><p>These aren’t small things. They’re the reasons millions of developers chose CSS-in-JS in the first place.</p><p>The tools that replaced it are better for the platform. They’re not always better for the developer.</p><h3>What Actually Happened</h3><p>CSS-in-JS didn’t fail.</p><p>It solved the right problems for the React model that existed in 2019. It got the architecture exactly right for client-rendered, context-driven component trees.</p><p>Then React changed its architecture.</p><p>Not because CSS-in-JS was wrong. Because the platform kept moving. Toward the server. Toward static rendering. Toward shipping less JavaScript. The constraints that CSS-in-JS was designed to work around became less relevant. The constraints it introduced became more expensive.</p><p>styled-components is still running in production on millions of apps.</p><p>It’s just not the future anymore.</p><p>And there’s something worth sitting with in that.</p><p>The tools we love don’t always get retired because they failed.</p><p>Sometimes they just get left behind by the thing they helped build.</p><p>That’s not a tragedy.</p><p>It’s just how software ends.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3140065cc649" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/what-happened-to-css-in-js-3140065cc649">What Happened to CSS-in-JS</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Virtualization vs Pagination vs Infinite Scroll: Choosing the Right Strategy]]></title>
            <link>https://javascript.plainenglish.io/virtualization-vs-pagination-vs-infinite-scroll-choosing-the-right-strategy-919648d2ba0b?source=rss-a19b2612c09------2</link>
            <guid isPermaLink="false">https://medium.com/p/919648d2ba0b</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Sarah Gentil]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 02:36:41 GMT</pubDate>
            <atom:updated>2026-02-15T02:36:41.520Z</atom:updated>
            <content:encoded><![CDATA[<h4>Or: W<em>hy “just add infinite scroll” is often the wrong answer</em></h4><p>It’s one of those requirements that sounds harmless.</p><p><em>“Let’s add infinite scroll.”</em></p><p>Sometimes that’s the right call.</p><p>Often, it isn’t.</p><p>Because pagination, infinite scroll, and virtualization solve very different problems. Pick the wrong one and you get:</p><ul><li>Weird UX</li><li>Confusing navigation</li><li>Unnecessary performance hits</li><li>Accessibility regressions</li><li>SEO limitations</li><li>And the classic: <em>“why does this page become unusable after a few minutes?”</em></li></ul><p>This article is a practical breakdown of when each strategy makes sense, what trade-offs they introduce, and how to choose deliberately, instead of by habit.</p><h3>The Three Strategies (Plus One)</h3><h4>Pagination</h4><p>Pagination splits a dataset into explicit pages. Users move forward and backward intentionally.</p><p><strong>How it works:</strong> Fetch N items, render one page, user navigates via controls.</p><p>You’ve seen this in Google search results, Stripe dashboards, Shopify category pages, and every admin panel ever built.</p><p><strong>Why it works</strong></p><p>✅ Predictable memory: only one page in the DOM<br>✅ URLs like ?page=4: shareable, bookmarkable, SEO-friendly<br>✅ Users know where they are: <em>“page 3 of 12”</em><br>✅ Footer is reachable (your legal team says thanks)<br>✅ Great for filtering, sorting, jumping around</p><p><strong>Where it hurts</strong></p><p>❌ Interrupts continuous browsing<br>❌ Can feel slower without prefetching<br>❌ Clunky on mobile for content-heavy feeds</p><h4>Infinite Scroll</h4><p>Infinite scroll continuously loads content as the user scrolls, without explicit navigation.</p><p><strong>How it works:</strong> Detect near-bottom, fetch more data, append to the DOM.</p><p>You’ve seen this in social feeds, content discovery surfaces, and image-heavy browsing experiences.</p><p><strong>Why it works</strong></p><p>✅ Frictionless consumption<br>✅ Feels natural on mobile<br>✅ Great for discovery-first experiences</p><p><strong>Where it hurts (this is where teams mess up)</strong></p><p>❌ DOM grows with every batch: browser starts crying after a few thousand items<br>❌ Footer becomes a myth<br>❌ Users lose their position when they hit “Back”<br>❌ No stable URLs<br>❌ Bad for screen readers<br>❌ Bad for SEO</p><p>Here’s the thing nobody tells you:</p><p><strong>Infinite scroll without virtualization is basically a slow memory leak with a nice UX.</strong></p><h4>Virtualization (Windowing)</h4><p>Virtualization renders only what’s visible in the viewport. Everything else is removed from the DOM.</p><p><strong>How it works:</strong> Calculate what’s in the viewport, mount those items, unmount the rest.</p><p>You’ve seen this in chat histories, file explorers, spreadsheets, and large data grids.</p><p><strong>Why it works</strong></p><p>✅ 10 items or 100,000 items: same performance<br>✅ Constant memory footprint<br>✅ Smooth when done right<br>✅ Pairs beautifully with pagination or infinite scroll</p><p><strong>Where it hurts</strong></p><p>❌ More complex to implement<br>❌ Ctrl+F doesn’t work for off-screen items<br>❌ You might see blank flashes on fast scroll<br>❌ Requires fixed or estimated item heights<br>❌ Accessibility needs careful handling</p><h4>The Hybrid: Infinite Scroll + Virtualization</h4><p>This is the one most articles leave out. And it’s the one most production apps actually need.</p><p><strong>How it works: </strong>Load data progressively like infinite scroll, but virtualize the DOM so only visible items are rendered.</p><p>You get the UX of infinite scroll with the performance of virtualization.</p><pre>// Simplified hybrid: progressive loading + virtualized rendering<br>const virtualizer = useVirtualizer({<br>  count: loadedCount, // only virtualize what&#39;s been fetched<br>  getScrollElement: () =&gt; parentRef.current,<br>  estimateSize: () =&gt; 80,<br>  overscan: 5,<br>});<br><br>// Trigger next batch when approaching the end of loaded data<br>useEffect(() =&gt; {<br>  const lastVisibleIndex = virtualizer.range?.endIndex ?? 0;<br>  if (lastVisibleIndex &gt;= loadedCount - 10 &amp;&amp; !loading) {<br>    loadNextBatch();<br>  }<br>}, [virtualizer.range?.endIndex]);</pre><p><strong>Why it works</strong></p><p>✅ Constant DOM size (~50 nodes) regardless of how much is loaded<br>✅ Progressive data fetching: no upfront load of everything<br>✅ Seamless scroll UX<br>✅ Production-realistic: this is how most large-scale feeds actually work</p><p><strong>Where it hurts</strong></p><p>❌ Most complex to implement<br>❌ Inherits virtualization’s Ctrl+F and accessibility trade-offs<br>❌ Network-dependent initial load</p><h3>The Actual Decision Framework</h3><p>The real question isn’t which pattern is trendier.</p><p>It’s: <strong><em>what is the user trying to do, with how much data, on what kind of connection?</em></strong></p><p>Two signals matter most: dataset size and network conditions.</p><h4>Small datasets (under 100 items)</h4><p>Use pagination. All strategies perform equally at this scale. Pagination is the simplest to implement and the easiest to reason about.</p><p>Don’t overthink it.</p><h4>Moderate datasets (100–1,000 items)</h4><p>On a fast network: infinite scroll works well here. DOM growth is manageable, and the seamless browsing experience feels natural.</p><p>On a slow network: pagination. Let users control when to load more data instead of watching a spinner after every scroll.</p><h4>Large datasets (1,000–10,000 items)</h4><p>On a fast network: hybrid. You need the smooth scroll of infinite loading plus the constant DOM of virtualization. This is where the composability of strategies starts to matter.</p><p>On a slow network: pagination. Immediate content per page beats waiting for progressive loads to trickle in.</p><h4>Very large datasets (10,000+ items)</h4><p>On a fast network: hybrid. Constant DOM size with incremental data fetching. This is the most production-realistic pattern.</p><p>On a slow network: pure virtualization. Skip the batch-fetch delays entirely. Generate or load everything client-side and let the virtualizer handle the rest.</p><h4>Offline or unreliable connections</h4><p>Pagination. Smallest data payload per request. Most resilient when connectivity is limited.</p><h3>These Strategies Are Composable</h3><p>They’re not mutually exclusive. Good systems often use more than one.</p><ul><li><strong>Pagination + Virtualization</strong> → Large data tables with page controls</li><li><strong>Infinite Scroll + Virtualization</strong> → Scalable feeds (the hybrid pattern)</li><li><strong>Pagination + Prefetching</strong> → Fast, intentional navigation</li></ul><p>The best pattern is often a combination. Not a single choice from a dropdown.</p><h3>Where This Breaks</h3><p>No framework survives contact with every use case. Here’s where my recommendations fall apart.</p><p><strong>Search-heavy interfaces. </strong>If users need Ctrl+F to find content in the list, virtualization will frustrate them. Off-screen items don’t exist in the DOM. For search-first experiences, stick with pagination and let the server do the filtering.</p><p><strong>Variable-height content. </strong>Virtualization works best with fixed or predictable item heights. If your items are wildly different sizes, you’ll spend significant time on height estimation and layout shift prevention. Think a social feed mixing text posts, image galleries, and embedded videos.</p><p><strong>SEO-critical pages.</strong> If search engines need to crawl your list content, infinite scroll and virtualization are both problematic. Pagination with proper ?page= URLs is the only strategy that plays well with crawlers out of the box.</p><p><strong>Accessibility-first products. </strong>Both infinite scroll and virtualization have screen reader challenges. Infinite scroll lacks clear navigation landmarks. Virtualization removes content from the DOM that assistive technology expects to find. If accessibility is non-negotiable (and it should be), pagination is the safest baseline.</p><p><strong>Small teams, tight deadlines.</strong> The hybrid pattern is the “right” answer for large datasets, but it’s also the most complex. If you’re shipping fast and your dataset is under a few thousand items, plain infinite scroll might be good enough. Perfect is the enemy of shipped.</p><h3>Implementation Notes</h3><p><strong>Virtualization:</strong> @tanstack/react-virtual is my current pick. Lightweight, headless, framework-agnostic. react-virtuoso is solid if you want more out of the box. react-window works but is less actively maintained.</p><p><strong>Infinite scroll detection:</strong> Use IntersectionObserver, not scroll listeners. Libraries like react-intersection-observer make this trivial:</p><pre>import { useInView } from &#39;react-intersection-observer&#39;;<br><br>const { ref, inView } = useInView({ rootMargin: &#39;100px&#39; });<br><br>useEffect(() =&gt; {<br>  if (inView &amp;&amp; !loading &amp;&amp; hasMore) {<br>    loadNextBatch();<br>  }<br>}, [inView]);<br><br>// Place sentinel at the end of your list<br>return (<br>  &lt;&gt;<br>    {items.map(item =&gt; &lt;ListItem key={item.id} {...item} /&gt;)}<br>    &lt;div ref={ref} /&gt; {/* invisible trigger */}<br>  &lt;/&gt;<br>);</pre><p><strong>Pagination: </strong>Handle cache invalidation carefully when data shifts between pages. If someone deletes an item on page 2, page 3’s content shifts. Your user might miss an item or see a duplicate.</p><blockquote><em>💡</em><strong><em> Pro tip:</em></strong><em> For the hybrid pattern, use a “near-end threshold” approach. Start fetching the next batch when the user is 10–15 items away from the end of loaded data, not at the absolute bottom. This keeps loading invisible.</em></blockquote><h3>Summary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*onotJ4L05UTnlej0D2Zsxg.png" /></figure><h3>The Conversation You Should Actually Be Having</h3><p>Instead of debating UI patterns directly, align on constraints:</p><ul><li>How large can this dataset grow?</li><li>Are users browsing or searching?</li><li>What are the network conditions?</li><li>Do they need to share or return to a specific position?</li><li>What happens at the “end” of the content?</li><li>Does performance degrade over time?</li></ul><p>Answering these questions usually makes the choice obvious.</p><h3>🧪 I Built a Playground for This</h3><p>Every pattern in this article lives in a real repo. Not pseudocode. Actual implementations you can run, break, and fork.</p><p>List Lab lets you:</p><ul><li>Compare all four strategies side-by-side</li><li>Monitor real-time performance metrics (DOM nodes, render time, memory)</li><li>Switch between different content themes (products, social posts, logs)</li><li>Test with datasets from 100 to 100,000 items</li><li>Simulate network conditions (fast, slow, offline)</li><li>Get recommendations based on your current configuration</li></ul><p>👉 <strong>Try it live:</strong> <a href="https://listlab-lake.vercel.app/">https://listlab-lake.vercel.app/</a> <br>👉 <strong>Explore the source:</strong> <a href="https://github.com/sarahizabel7/listlab">https://github.com/sarahizabel7/listlab</a></p><p>Pagination, infinite scroll, and virtualization are not interchangeable UI patterns.</p><p>They encode assumptions about user intent, navigation, and performance.</p><p>Next time a requirement arrives with the solution already decided: pause. Ask why. Look at the data. Consider the constraints.</p><p>That’s not being difficult.</p><p>That’s engineering.</p><p>Got questions, or a use case that doesn’t fit neatly into this framework? Drop a comment below 💬</p><p>I’d love to hear 💙</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=919648d2ba0b" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/virtualization-vs-pagination-vs-infinite-scroll-choosing-the-right-strategy-919648d2ba0b">Virtualization vs Pagination vs Infinite Scroll: Choosing the Right Strategy</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi-step Forms With Zod + React Hook Form: Patterns That Actually Work]]></title>
            <link>https://javascript.plainenglish.io/multi-step-forms-with-zod-react-hook-form-patterns-that-actually-work-07b5a9461263?source=rss-a19b2612c09------2</link>
            <guid isPermaLink="false">https://medium.com/p/07b5a9461263</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Sarah Gentil]]></dc:creator>
            <pubDate>Fri, 30 Jan 2026 17:51:59 GMT</pubDate>
            <atom:updated>2026-01-31T07:10:11.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*maX_SZNQMSvvJJ4nIKVEqw.png" /></figure><p>Multi-step forms look simple on the surface.</p><p>Until you actually build one.</p><p>Suddenly you’re dealing with:</p><ul><li>Validation for fields that aren’t visible</li><li>State persistence across steps</li><li>Partial submissions</li><li>Conditional steps</li><li>Server-side errors</li><li>and a UX that <em>must not</em> yell at the user too early</li></ul><p>This article is about <strong>building multi-step forms with Zod + React Hook Form that don’t fight you</strong> , and more importantly: don’t fight your users.</p><blockquote><em>🧪 </em><strong><em>Interactive Playground (Live Demo + Source Code)</em></strong><em><br>👉 </em><a href="https://rhf-zod-playground.vercel.app/"><em>https://rhf-zod-playground.vercel.app </em></a><em><br>👉 </em><a href="https://github.com/sarahizabel7/rhf-zod-playground"><em>https://github.com/sarahizabel7/rhf-zod-playground</em></a></blockquote><p><em>All patterns discussed below are implemented as real, interactive examples you can click through, break, and explore.</em></p><h3>The first (and most important) decision</h3><p>Before writing any code, you need to answer <strong>one question</strong>:</p><blockquote><em>Do I want </em><strong><em>one form</em></strong><em> with multiple steps<br>or </em><strong><em>multiple forms</em></strong><em>, one per step?</em></blockquote><p>Everything else depends on this.</p><h3>Pattern 1: One form, multiple steps (most common)</h3><p>This is the pattern you want <strong>most of the time</strong>.</p><h3>Characteristics</h3><ul><li>One useForm</li><li>One shared form state</li><li>Steps only control <strong>what is visible</strong></li><li>Validation runs <strong>per step</strong>, not globally</li></ul><h3>When to use</h3><p>✅ Linear flows (signup, onboarding, checkout)<br>✅ Data needs to persist across steps<br>✅ You want one final submit</p><h3>The real trap: validating fields that don’t exist (yet)</h3><p>The biggest mistake people make is this:</p><pre>useForm({<br>  resolver: zodResolver(fullSchema),<br>});</pre><p>Where fullSchema includes <strong>all fields from all steps</strong>.</p><p>Result?</p><ul><li>Step 1 fails because Step 3 fields are missing</li><li>You start hacking optional() everywhere</li><li>Validation logic becomes unreadable</li></ul><p>❌ Don’t do this.</p><h3>The correct mental model</h3><p>Think in <strong>layers</strong>, not steps:</p><ol><li><strong>Domain schema: </strong>the full data contract</li><li><strong>Step schemas: </strong>subsets of the domain</li><li><strong>Final validation: </strong>when everything is complete</li></ol><h3>Step 1: Define the full domain schema (once)</h3><p>This is your <strong>single source of truth</strong>.</p><pre>import { z } from &quot;zod&quot;;<br><br>export const onboardingSchema = z.object({<br>  // Step 1: Account<br>  email: z.string().min(1, &quot;Email is required&quot;).email(&quot;Invalid email&quot;),<br>  password: z.string().min(8, &quot;Password must be at least 8 characters&quot;),<br><br>  // Step 2: Profile<br>  firstName: z.string().min(1, &quot;First name is required&quot;),<br>  lastName: z.string().min(1, &quot;Last name is required&quot;),<br><br>  // Step 3: Company (conditional)<br>  accountType: z.enum([&quot;personal&quot;, &quot;business&quot;]),<br>  companyName: z.string().optional(),<br>  teamSize: z.coerce.number().min(1).optional(),<br>});<br><br>export type OnboardingData = z.infer&lt;typeof onboardingSchema&gt;;</pre><p>This schema describes:</p><ul><li>what eventually exists</li><li>what the backend expects</li><li>what “valid data” means overall</li></ul><h3>Step 2: Create step schemas from the domain</h3><p>Instead of rewriting schemas, <strong>derive them</strong>.</p><pre>export const accountStepSchema = onboardingSchema.pick({<br>  email: true,<br>  password: true,<br>});<br><br>export const profileStepSchema = onboardingSchema.pick({<br>  firstName: true,<br>  lastName: true,<br>});<br><br>export const companyStepSchema = onboardingSchema.pick({<br>  accountType: true,<br>  companyName: true,<br>  teamSize: true,<br>});<br><br>// Type inference works automatically<br>type AccountStepData = z.infer&lt;typeof accountStepSchema&gt;;</pre><p>This is a <strong>huge win</strong>:</p><ul><li>No duplication</li><li>No drift</li><li>Refactors stay safe</li><li>Full type inference</li></ul><blockquote><em>💡 </em><strong><em>Pro tip</em></strong><em>: You can also use </em><em>.omit() to exclude fields or </em><em>.extend() to add step-specific fields that aren’t part of the final schema.</em></blockquote><h3>Step 3: Set Up the Form with FormProvider</h3><p>Use FormProvider to share form state across step components without prop drilling.</p><pre>import { useForm, FormProvider } from &quot;react-hook-form&quot;;<br><br>const form = useForm&lt;OnboardingData&gt;({<br>  mode: &quot;onTouched&quot;, // Best UX balance<br>  shouldUnregister: false, // Preserves values when steps unmount<br>  defaultValues: {<br>    email: &quot;&quot;,<br>    password: &quot;&quot;,<br>    firstName: &quot;&quot;,<br>    lastName: &quot;&quot;,<br>    accountType: &quot;personal&quot;,<br>    companyName: &quot;&quot;,<br>  },<br>});<br><br>return (<br>  &lt;FormProvider {...form}&gt;<br>    &lt;form onSubmit={form.handleSubmit(onSubmit)}&gt;<br>      {currentStep === 0 &amp;&amp; &lt;AccountStep /&gt;}<br>      {currentStep === 1 &amp;&amp; &lt;ProfileStep /&gt;}<br>      {currentStep === 2 &amp;&amp; &lt;CompanyStep /&gt;}<br>    &lt;/form&gt;<br>  &lt;/FormProvider&gt;<br>);</pre><h3>Step 4: Validate only the current step</h3><p>This is where multi-step forms usually break.</p><p><strong>Option A: </strong><strong>trigger() with Field Names (Recommended):</strong></p><pre>const stepFields = {<br>  0: [&quot;email&quot;, &quot;password&quot;],<br>  1: [&quot;firstName&quot;, &quot;lastName&quot;],<br>  2: [&quot;accountType&quot;, &quot;companyName&quot;, &quot;teamSize&quot;],<br>} as const;<br><br>function useStepNavigation(currentStep: number) {<br>  const { trigger } = useFormContext&lt;OnboardingData&gt;();<br><br>  const handleNext = async () =&gt; {<br>    const fields = stepFields[currentStep];<br>    const isValid = await trigger(fields);<br><br>    if (isValid) {<br>      setCurrentStep((prev) =&gt; prev + 1);<br>    }<br>  };<br><br>  return { handleNext };<br>}</pre><p>Why this works:</p><ul><li>Uses RHF’s built-in validation</li><li>Errors populate formState.errors</li><li>No manual mapping</li></ul><p><strong>Option B: Manual Zod Validation (More Control):</strong></p><pre>const handleNext = () =&gt; {<br>  const data = form.getValues();<br>  const result = accountStepSchema.safeParse(data);<br><br>  if (!result.success) {<br>    result.error.errors.forEach((err) =&gt; {<br>      form.setError(err.path[0] as keyof OnboardingData, {<br>        type: &quot;manual&quot;,<br>        message: err.message,<br>      });<br>    });<br>    return;<br>  }<br><br>  goToNextStep();<br>};</pre><p>Use this when you need full control over error UX.</p><h3>UX rule: never validate what the user can’t see</h3><p>This is non-negotiable.</p><p>If a field:</p><ul><li>is not visible</li><li>is not relevant</li><li>depends on a future choice</li></ul><p>👉 <strong>Do not validate it.</strong></p><p>Users interpret validation errors as <em>“I did something wrong”</em>.<br>Don’t punish them for not being psychic.</p><h3>Conditional Steps (Real-World Example)</h3><p>Let’s say:</p><blockquote><em>If company info is only required for business accounts:</em></blockquote><p><strong>Enforce at the domain level</strong></p><pre>.superRefine((data, ctx) =&gt; {<br>  if (data.accountType === &quot;business&quot;) {<br>    if (!data.companyName) {<br>      ctx.addIssue({<br>        path: [&quot;companyName&quot;],<br>        message: &quot;Company name is required&quot;,<br>        code: z.ZodIssueCode.custom,<br>      });<br>    }<br>  }<br>});</pre><p><strong>Skip steps dynamically</strong></p><pre>const steps = useMemo(() =&gt; {<br> const base = [AccountStep, ProfileStep];<br> if (watchedAccountType === &quot;business&quot;) {<br> base.push(CompanyStep);<br> }<br> return base;<br>}, [watchedAccountType]);</pre><p>Step validation stays local. Final submit enforces everything.</p><h3>Final submission = full schema validation</h3><p>Only when the user finishes all steps:</p><pre>const onSubmit = (data: OnboardingData) =&gt; {<br>  const result = onboardingSchema.safeParse(data);<br><br>  if (!result.success) {<br>    const errorFields = result.error.errors.map((e) =&gt; e.path[0]);<br>    const stepWithError = findStepContainingFields(errorFields);<br>    setCurrentStep(stepWithError);<br>    return;<br>  }<br><br>  submitToBackend(result.data);<br>};</pre><p>This guarantees:</p><ul><li>No partial data reaches the backend</li><li>Cross-step rules are enforced</li><li>Backend receives trusted input</li></ul><h3>Pattern 2: One form per step (when it makes sense)</h3><p>This is less common, but valid.</p><h3>Use it when:</h3><ul><li>Steps are fully independent</li><li>Each step saves data immediately</li><li>Navigation is non-linear</li><li>Backend persists after every step</li></ul><h3>Trade-offs</h3><p>✅ Simpler validation<br>❌ Harder state synchronization<br>❌ More boilerplate</p><p>For onboarding and checkout flows, <strong>Pattern 1 wins</strong> almost every time.</p><h3>Common mistakes to avoid</h3><p>❌ Making everything .optional()<br>❌ Recreating schemas inside components<br>❌ Validating on every render<br>❌ Using one giant resolver<br>❌ Forgetting shouldUnregister: false<br>❌ Using z.string() without .min(1)</p><h3>Final checklist</h3><p>Before writing code, ask yourself:</p><ul><li>Where does the <strong>full data contract</strong> live?</li><li>How do I validate <strong>only what’s visible</strong>?</li><li>When do cross-field rules apply?</li><li>What happens if the user goes back?</li><li>What does “submit” really mean in this flow?</li></ul><p>If you answer those upfront, Zod + React Hook Form becomes a joy, not a fight.</p><h4>Want to explore real examples?</h4><p>Every pattern covered in this article is implemented in a small playground with real validation flows.</p><p>👉 <strong>Live Demo:</strong> <a href="https://rhf-zod-playground.vercel.app/">https://rhf-zod-playground.vercel.app</a> <br>👉<strong> Source Code:</strong> <a href="https://github.com/sarahizabel7/rhf-zod-playground">https://github.com/sarahizabel7/rhf-zod-playground</a></p><p>Feel free to fork the repo, break the examples, and adapt the patterns to your own onboarding or checkout flows.</p><p><em>Got questions, thoughts, or a fun edge case? Drop a comment below </em>💬<em><br>I’d love to hear </em>💙</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07b5a9461263" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/multi-step-forms-with-zod-react-hook-form-patterns-that-actually-work-07b5a9461263">Multi-step Forms With Zod + React Hook Form: Patterns That Actually Work</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Hooks Without Pain: Patterns to Avoid Unnecessary Re-Renders]]></title>
            <link>https://javascript.plainenglish.io/react-hooks-without-pain-patterns-to-avoid-unnecessary-re-renders-96e93c94f44f?source=rss-a19b2612c09------2</link>
            <guid isPermaLink="false">https://medium.com/p/96e93c94f44f</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Sarah Gentil]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 10:43:31 GMT</pubDate>
            <atom:updated>2026-01-29T19:25:53.155Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jQftqW6Wtly11fahf7m-4w.jpeg" /></figure><p>React Hooks are amazing.<br>They made logic reusable, expressive, and composable.</p><p>They also made it <strong>very easy</strong> to accidentally turn your app into a re-render festival 🎉 (the bad kind).</p><p>If you’ve ever asked yourself:</p><blockquote>“Why is this component re-rendering again?? I didn’t touch anything 😭”</blockquote><p>This article is for you.</p><p>Let’s talk about <strong>real patterns</strong> that help you avoid unnecessary re-renders, without over-optimizing, without magic, and without suffering.</p><h3>First Things First: Re-renders Are Not Evil 😈➡️😇</h3><p>Let’s clear this up early:</p><blockquote><strong><em>Re-renders are normal. Excessive re-renders are the problem.</em></strong></blockquote><p>React is fast.<br>Re-rendering a component is cheap.</p><p>What actually hurts performance:</p><ul><li>expensive computations running too often 🐢</li><li>re-renders cascading deep into the tree 🌳</li><li>components updating when nothing meaningful changed 🤡</li></ul><p>The goal is not “no re-renders”.<br>The goal is <strong>predictable re-renders</strong>.</p><h3>1️⃣ What Actually Triggers a Re-render?</h3><p>A component re-renders when:</p><ol><li>Its <strong>state</strong> changes</li><li>Its <strong>props</strong> change</li><li>Its <strong>context value</strong> changes</li><li>Its <strong>parent re-renders</strong> (yes, this still matters 👀)</li></ol><p>Hooks don’t change this model. They just make it easier to forget about it.</p><h3>2️⃣ The #1 Re-render Villain: Unstable References</h3><p>In JavaScript, objects and functions are compared by <strong>reference</strong>, not by value.</p><p>That means this:</p><pre>const config = { theme: &#39;dark&#39; };</pre><p>creates a <strong>new object every render</strong>.</p><h4>What React “sees”</h4><p>Every render:</p><ul><li>new object</li><li>new reference</li><li>React thinks something changed</li></ul><p>React’s reaction:</p><blockquote><em>“Oh, new thing? Guess I’ll re-render 😎”</em></blockquote><h4>❌ Common mistake</h4><pre>&lt;MyComponent options={{ sort: &#39;asc&#39; }} /&gt;</pre><p>Looks innocent.<br>It is not.</p><h4>Step by step: what happens here?</h4><p>1️⃣ Parent component re-renders<br>2️⃣ { sort: &#39;asc&#39; } is recreated<br>3️⃣ Child receives a <strong>new prop reference</strong><br>4️⃣ Child re-renders 🔁</p><p>Even though the value <em>looks</em> the same.</p><h4>✅ Pattern: Stabilize references with useMemo</h4><pre>const options = useMemo(<br>  () =&gt; ({ sort: &#39;asc&#39; }),<br>  []<br>);<br><br>&lt;MyComponent options={options} /&gt;</pre><p>Now:</p><p>1️⃣ Parent re-renders<br>2️⃣ useMemo returns the same object<br>3️⃣ Child receives the same reference<br>4️⃣ Child can skip re-rendering 😌</p><p>📌 <strong>Rule of thumb</strong><br> If you pass it as a prop and it’s not a primitive, ask yourself if the reference should be stable.</p><h3>3️⃣ useCallback: Not Decoration, Stability 🧠</h3><p>useCallback is one of the most misunderstood hooks.</p><h4>❌ Anti-pattern</h4><pre>const handleClick = useCallback(() =&gt; {<br>  setCount(count + 1);<br>}, [count]);</pre><p>At first glance, this looks correct.<br>But let’s translate what React actually does.</p><h4>Step by step: what happens when count changes?</h4><p>1️⃣ count changes<br>2️⃣ Component re-renders<br>3️⃣ React checks useCallback<br>4️⃣ Dependency [count] changed ❌<br>5️⃣ React creates a <strong>new function</strong></p><p>So in practice:</p><p>👉 Every time count changes, <strong>the function changes too</strong>.</p><h4>So what did you gain?</h4><p>Nothing 😅</p><p>Because the function is not stable:</p><ul><li>memoized children re-render</li><li>effects depending on this function re-run</li><li>useCallback becomes decoration 🎀</li></ul><p>You memoized something that changes anyway.</p><h4>✅ Correct pattern</h4><pre>const handleClick = useCallback(() =&gt; {<br>  setCount(c =&gt; c + 1);<br>}, []);</pre><p>This looks similar, but behaves very differently.</p><h4>What is setCount(c =&gt; c + 1)?</h4><p>This is a <strong>functional update</strong>.</p><p>Instead of using count from the current render, you’re saying:</p><blockquote><em>“React, give me the most recent value of </em><em>count and increment it.”</em></blockquote><p>Which means:</p><ul><li>the function does <strong>not depend on </strong><strong>count</strong></li><li>count does <strong>not need to be in the dependency array</strong></li></ul><h4>What happens now on re-renders?</h4><p>1️⃣ Component re-renders<br>2️⃣ React checks useCallback<br>3️⃣ Dependencies [] did not change ✅<br>4️⃣ React returns the <strong>same function reference</strong></p><p>🎯 Now the function is actually stable.</p><p>📌 <strong>Mental model</strong><br> useCallback exists for <strong>reference stability</strong>, not because “it’s faster”.</p><h3>4️⃣ useMemo: Cache Results, Not Vibes ✨</h3><h4>❌ Please don’t do this</h4><pre>const value = useMemo(() =&gt; count + 1, [count]);</pre><p>Let’s translate:</p><p>1️⃣ count changes<br>2️⃣ Component re-renders<br>3️⃣ useMemo recalculates<br>4️⃣ You saved… nothing 😅</p><p>This computation is cheap. Memoization adds more complexity than value.</p><h4>✅ Good useMemo use cases</h4><ul><li>expensive calculations 🧮</li><li>filtering large lists</li><li>derived data passed to memoized children</li></ul><pre>const activeItems = useMemo(() =&gt; {<br>  return items.filter(item =&gt; item.active);<br>}, [items]);</pre><p>Here:</p><ul><li>the computation is meaningful</li><li>the reference stability matters</li></ul><p>📌 Memoization has a cost.<br> If it’s cheap to compute, don’t memoize it.</p><h3>5️⃣ State Location: The Silent Re-render Multiplier</h3><p>Where you put state matters <strong>a lot</strong>.</p><h4>❌ Anti-pattern</h4><pre>&lt;Page&gt;<br>  &lt;SearchBar /&gt;<br>  &lt;ResultsList /&gt;<br>  &lt;Sidebar /&gt;<br>&lt;/Page&gt;</pre><p>Imagine:</p><ul><li>the search input filters the list</li><li>the search state lives in Page</li></ul><p>So far, so good… until we look closer.</p><h4>Step by step: typing one character</h4><p>1️⃣ User types in SearchBar<br>2️⃣ Search state updates<br>3️⃣ Page re-renders<br>4️⃣ ResultsList re-renders ✅ (it should)<br>5️⃣ Sidebar re-renders ❌ (why??)</p><p>The list <strong>needs</strong> to update.<br>The sidebar does not.</p><p>But because the state lives too high, everything pays the price.</p><h4>Why this becomes a problem</h4><p>At first, this feels harmless.</p><p>But over time:</p><ul><li>sidebars get heavier</li><li>pages grow</li><li>more components hang off the same parent</li></ul><p>Now every keystroke triggers a mini app-wide update 😵‍💫</p><p>That’s the silent multiplier.</p><h4>✅ Pattern: Group state with what actually uses it</h4><pre>&lt;SearchContainer&gt;<br>  &lt;SearchBar /&gt;<br>  &lt;ResultsList /&gt;<br>&lt;/SearchContainer&gt;<br><br>&lt;Sidebar /&gt;</pre><p>Same behavior.<br>Less damage.</p><p>📌 <strong>Golden rule</strong><br> State should live as low as possible, but high enough to be shared.</p><h3>6️⃣ Derived State Is Usually a Smell 👃</h3><h4>❌ Don’t sync state like this</h4><pre>const [fullName, setFullName] = useState(&#39;&#39;);<br><br>useEffect(() =&gt; {<br>  setFullName(`${firstName} ${lastName}`);<br>}, [firstName, lastName]);</pre><h4>Step by step: what’s going wrong?</h4><p>1️⃣ firstName or lastName changes<br>2️⃣ Component re-renders<br>3️⃣ useEffect runs<br>4️⃣ setFullName triggers another render</p><p>You now have:</p><ul><li>duplicated data</li><li>extra renders</li><li>synchronization bugs waiting to happen 🐛</li></ul><h4>✅ Just compute it</h4><pre>const fullName = `${firstName} ${lastName}`;</pre><p>React is already re-rendering.<br>Let it work for you.</p><h3>7️⃣ React.memo: Powerful, But Not Free 💸</h3><p>React.memo only helps if <strong>props don’t change by reference</strong>.</p><h4>✅ Great use cases</h4><ul><li>pure UI components 🎨</li><li>list items</li><li>expensive render trees</li></ul><pre>const Item = React.memo(function Item({ data }) {<br>  return &lt;div&gt;{data.name}&lt;/div&gt;;<br>});</pre><h4>❌ Bad use cases</h4><ul><li>components that always receive new objects or functions</li><li>components tightly coupled to parent state</li></ul><p>📌 Memo without stable props equals placebo optimization.</p><h3>8️⃣ Context: One Change to Re-render Them All 🧙‍♂️</h3><p>Context is incredibly useful.<br>It’s also very easy to accidentally make half your app re-render with it 😵‍💫</p><p>The problem is almost never <em>what</em> you put in context.<br>It’s <strong>how the value is created</strong>.</p><p>Let’s look at a real example.</p><h4>❌ A very common pitfall</h4><pre>export function AuthProvider({ children }) {<br>  const [user, setUser] = useState(null);<br>  <br>  const logout = () =&gt; {<br>      setUser(null);<br>  };<br>  <br>  return (<br>    &lt;AuthContext.Provider value={{ user, logout }}&gt;<br>      {children}<br>    &lt;/AuthContext.Provider&gt;<br>  );<br>}</pre><p>This looks totally reasonable.<br>And conceptually, it is.</p><p>user and logout absolutely belong in an auth context.</p><p>The problem is subtle, so let’s slow it down.</p><h4>Step by step: what React actually sees</h4><p>Imagine this tree:</p><pre>&lt;AuthProvider&gt;<br>  &lt;Header /&gt;<br>  &lt;Sidebar /&gt;<br>  &lt;MainContent /&gt;<br>&lt;/AuthProvider&gt;</pre><p>And all of these components do:</p><pre>const { user } = useAuth();</pre><p>Now follow the render flow 👇</p><p>1️⃣ AuthProvider re-renders<br> (this can happen for many reasons, not just auth changes)<br>2️⃣ { user, logout } is created again<br> (new object, new reference)<br>3️⃣ Context compares by reference<br> not by deep value<br>4️⃣ Context thinks the value changed<br>5️⃣ <strong>Header, Sidebar and MainContent all re-render 😵‍💫</strong></p><p>Even if:</p><ul><li>user did not change</li><li>logout is the same function</li></ul><p>That’s the trap.</p><h4>✅ Better pattern</h4><pre>export function AuthProvider({ children }) {<br>  const [user, setUser] = useState(null);<br><br>  const logout = useCallback(() =&gt; {<br>      setUser(null);<br>    }, []);<br>  <br>  const value = useMemo(<br>    () =&gt; ({ user, logout }),<br>    [user, logout]<br>  );<br>  <br>  return (<br>      &lt;AuthContext.Provider value={value}&gt;<br>        {children}<br>      &lt;/AuthContext.Provider&gt;<br>  );<br>}</pre><p>Now let’s replay the same scenario.</p><h4>Step by step again</h4><p>1️⃣ AuthProvider re-renders<br>2️⃣ React checks useMemo<br>3️⃣ user and logout did not change<br>4️⃣ The <strong>same object reference</strong> is reused ✅<br>5️⃣ Context value is the same<br>6️⃣ Consumers do <strong>not</strong> re-render 😌</p><p>Same behavior.<br>Much less damage.</p><h4>Why this matters in real apps 🧠</h4><p>In small apps, you won’t feel this immediately.</p><p>In real apps:</p><ul><li>providers grow</li><li>more consumers appear</li><li>re-renders get expensive</li></ul><p>An unstable context value becomes a silent performance multiplier.</p><h4>When splitting context makes sense 🧩</h4><p>Sometimes the problem is not just reference stability, but <strong>too many responsibilities in one context</strong>.</p><p>Example of a heavy context:</p><pre>value={{<br>  user,<br>  logout,<br>  theme,<br>  language,<br>  featureFlags,<br>  isMobile<br>}}</pre><p>Now:</p><ul><li>changing the theme re-renders auth consumers</li><li>toggling a feature flag re-renders auth consumers</li></ul><p>Even when they don’t care.</p><h4>A better separation</h4><pre>&lt;AuthProvider&gt;<br>  &lt;ThemeProvider&gt;<br>    &lt;FeatureFlagProvider&gt;<br>      {children}<br>    &lt;/FeatureFlagProvider&gt;<br>  &lt;/ThemeProvider&gt;<br>&lt;/AuthProvider&gt;</pre><p>Or even:</p><ul><li>AuthUserContext</li><li>AuthActionsContext</li></ul><p>Smaller contexts mean more precise updates.</p><p>📌 <strong>Mental model</strong></p><blockquote><em>Context re-renders all consumers whenever the </em><em>value changes by reference.</em></blockquote><h3>9️⃣ Measure Before You Optimize 📊</h3><p>Before changing anything:</p><ul><li>React DevTools with Highlight Updates</li><li>React Profiler</li><li>why-did-you-render</li></ul><p>📌 If users can’t feel it, don’t “fix” it.</p><h3>Quick Checklist ✅</h3><p>Before optimizing, ask yourself:</p><ul><li>Is this visibly slow?</li><li>Are props or callbacks unstable?</li><li>Is state living too high?</li><li>Am I memoizing for a real reason?</li><li>Can I explain <em>why</em> this optimization exists?</li></ul><p>If the answer is “uhhh…” stop 😄</p><h3>Final Thoughts 💭</h3><p>React Hooks are not the problem.<br><strong>Unclear mental models are.</strong></p><p>Once you understand:</p><ul><li>reference equality</li><li>state ownership</li><li>render boundaries</li></ul><p>Hooks stop being scary, and boring React code is <strong>great React code</strong> 💚</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96e93c94f44f" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/react-hooks-without-pain-patterns-to-avoid-unnecessary-re-renders-96e93c94f44f">React Hooks Without Pain: Patterns to Avoid Unnecessary Re-Renders</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Frontend Engineers Should Care More About UX Than Frameworks ]]></title>
            <link>https://medium.com/@sarahizabelp/frontend-engineers-should-care-more-about-ux-than-frameworks-5b0ed215a6e0?source=rss-a19b2612c09------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b0ed215a6e0</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ux-design]]></category>
            <dc:creator><![CDATA[Sarah Gentil]]></dc:creator>
            <pubDate>Tue, 27 Jan 2026 13:04:15 GMT</pubDate>
            <atom:updated>2026-01-27T13:04:15.020Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7gkTSh4LXOySWWAiniwv2w.jpeg" /></figure><p>Let’s be honest for a second. <strong>We’ve all been there. </strong>You’re in a heated Slack debate about whether to use React, Vue, or Svelte for the new project.</p><p>Someone drops a benchmark. Another person shares a blog post titled “Why [Framework X] is Dead.” The discussion spirals into a 47-message thread about virtual DOM performance and bundle sizes. 📊</p><p>Meanwhile, your users are out there <em>struggling to find the damn submit button</em>.</p><p>Here’s the uncomfortable truth that nobody wants to hear at the next tech meetup: <strong>Your users don’t care about your tech stack. </strong>They don’t care if you’re using the latest bleeding-edge framework or if your build process is optimized to shave off 0.3 seconds. They care about one thing and one thing only: <em>Can they accomplish what they came here to do? </em>🎯</p><h3>The Framework Obsession Epidemic 🦠</h3><p>We’ve created a culture in frontend development where technical prowess is measured by how many frameworks you’ve mastered, how quickly you adopt the newest tools, and how eloquently you can argue about state management patterns. Job descriptions read like grocery lists of technologies. “Must know React, Next.js, TypeScript, Tailwind, GraphQL, and have opinions about micro-frontends.”</p><p><strong>But here’s what they should say: </strong>“Must understand how humans interact with interfaces. Must care deeply about accessibility. Must be willing to question every design decision through the lens of user needs.”</p><p>💡 <strong>Reality Check: </strong>A perfectly architected React application with terrible UX is just an expensive way to frustrate people.</p><h3>We’re Solving the Wrong Problems 🤔</h3><p>Frontend engineering has become increasingly sophisticated. We have incredible tools for code splitting, lazy loading, server-side rendering, and state management. We can build applications that are technically impressive marvels of modern engineering.</p><p>And yet, <em>basic usability continues to suffer</em>.</p><p>Forms that don’t tell you what went wrong. Navigation that requires a PhD to understand. Loading states that leave users wondering if anything is happening. Buttons that don’t look like buttons. <strong>These aren’t framework problems. These are empathy problems. </strong>❤️</p><blockquote>“Some people think design means how it looks. But of course, if you dig deeper, it’s really how it works.”</blockquote><blockquote><strong>Steve Jobs</strong></blockquote><h3>What Caring About UX Actually Means 🛠️</h3><p>Caring about UX doesn’t mean you need to become a designer. It doesn’t mean you need to run user research sessions or create wireframes (though those things help). It means <strong>fundamentally shifting your perspective </strong>from “what can I build?” to “what should I build, and how should it behave?”</p><h3>It Means Asking Different Questions ❓</h3><p>Instead of:</p><ul><li>“What’s the best way to implement this feature?”</li><li>“Which library should I use for this?”</li><li>“How can I make this code more elegant?”</li></ul><p>Start asking:</p><ul><li>“Will users understand what this button does?” 🤷</li><li>“What happens when this API call fails? What will the user see?”</li><li>“Can someone using a keyboard navigate this interface?”</li><li>“Is this loading fast enough, or will users think it’s broken?”</li><li>“What if someone is using this on a slow connection? Or a small screen? Or with a screen reader?” 📱</li></ul><p>It Means Sweating the Small Stuff 💧</p><p>UX lives in the details. The difference between a good experience and a frustrating one often comes down to tiny decisions that developers make dozens of times per day:</p><ul><li><strong>Focus management: </strong>When a modal closes, where does focus go? When a form submits, does focus jump to the error message?</li><li><strong>Error states: </strong>Does your error message actually explain what went wrong and how to fix it, or does it just say “Error: 422”? 🚨</li><li><strong>Loading states: </strong>Is there visual feedback when something is processing, or do users just sit there wondering?</li><li><strong>Empty states: </strong>What does the page look like before there’s any data? Is it helpful or just blank and confusing?</li><li><strong>Success feedback: </strong>When something works, does the user know it worked? ✅</li></ul><p><em>None of these problems are solved by choosing the right framework. </em>They’re solved by <strong>caring about the experience </strong>.</p><h3>The Performance Paradox ⚡</h3><p>Here’s where it gets interesting. Frontend engineers love to optimize performance. We’ll spend hours shaving milliseconds off load times, implementing code splitting strategies, and debating the merits of different bundlers. And that’s <em>great </em>! Performance matters.</p><p>But here’s the thing: <strong>perceived performance often matters more than actual performance. </strong>🧠</p><p>A page that loads in 2 seconds but provides no feedback feels slower than a page that takes 3 seconds but shows a progress indicator. A form that submits instantly but doesn’t confirm success leaves users clicking the button multiple times. A navigation that’s technically fast but requires three clicks to get anywhere feels sluggish.</p><p>⏱️ <strong>The Truth: </strong>Users don’t experience your Lighthouse scores. They experience your interface.</p><h3>Accessibility Isn’t Optional 🌍</h3><p>Let’s talk about the elephant in the room: <strong>accessibility </strong>. If you’re building for the web and not thinking about accessibility, you’re not building for everyone. You’re building for <em>some people </em>and actively excluding others.</p><p>And here’s the kicker: <strong>accessibility improvements make experiences better for everyone. </strong>Not just people using assistive technologies. 🎉</p><ul><li>Keyboard navigation helps power users move faster</li><li>Clear focus indicators help everyone know where they are</li><li>Proper heading structure helps everyone scan content</li><li>High contrast ratios help people in bright sunlight</li><li>Clear error messages help everyone fix problems faster</li></ul><p>Your framework choice doesn’t automatically make your app accessible. <em>You </em>make it accessible by caring about it and implementing it properly. 🛠️</p><h3>But Frameworks DO Matter… Right? 🤨</h3><p>Look, I’m not saying frameworks don’t matter. They absolutely do. The right tools can make you more productive, help you write more maintainable code, and enable you to build more sophisticated applications. <strong>Frameworks are important.</strong></p><p>But they’re <em>means to an end </em>, not the end itself. 🎯</p><p>The end is <strong>creating valuable, usable experiences for real people </strong>. If your framework choice helps you do that better, fantastic. But if you’re spending more time debating frameworks than thinking about users, you’ve got your priorities backwards.</p><h3>How to Actually Care More About UX 💪</h3><p>Okay, so you’re convinced. You want to care more about UX. What does that actually look like in practice?</p><h3>1. Use Your Own Stuff 🔍</h3><p>Seriously. Use your application the way a real user would. Don’t just test the happy path. Try to break it. Use it on your phone. Use it with a keyboard only. Use it with a screen reader. <strong>Experience your own friction.</strong></p><h3>2. Watch Real Users (If You Can) 👀</h3><p>Nothing will humble you faster than watching someone struggle with something you thought was obvious. If you have access to user research, user testing, or support tickets, <em>pay attention to them </em>. They’re gold mines of insight.</p><h3>3. Learn the Basics of UX 📚</h3><p>You don’t need to become a UX designer, but understanding fundamental principles helps. Learn about cognitive load, visual hierarchy, affordances, feedback loops, and accessibility guidelines. These concepts will change how you approach every interface decision.</p><h3>4. Collaborate with Designers 🤝</h3><p>If you work with designers, <strong>actually collaborate with them </strong>. Don’t just implement their mockups. Ask questions. Understand the reasoning. Offer technical insights that might affect the design. The best products come from tight designer-developer collaboration.</p><h3>5. Build Empathy Into Your Process ❤️</h3><p>Before writing code, think through the user journey. What are they trying to accomplish? What might go wrong? What questions might they have? <strong>Make empathy a habit, not an afterthought.</strong></p><blockquote>“People ignore design that ignores people.”</blockquote><blockquote><strong>Frank Chimero, Designer</strong></blockquote><h3>The Real Competitive Advantage 🚀</h3><p>Here’s the beautiful irony: while everyone else is racing to master the latest framework, <strong>caring deeply about UX is actually a competitive advantage</strong>.</p><p>Most developers can learn a new framework in a few weeks. But developing genuine user empathy, understanding interaction patterns, and building intuitive interfaces? <em>That takes time and intentional practice.</em></p><p>Companies are desperate for engineers who can build things that people actually want to use. Not just things that are technically impressive, but things that <strong>solve real problems in understandable ways</strong>.</p><p>🎯 <strong>Career Tip: </strong>Being the engineer who cares about UX will make you invaluable to any team.</p><h3>The Bottom Line 📝</h3><p>Frameworks will come and go. In five years, we’ll probably be having the same debates about different tools. That’s the nature of frontend development, and it’s actually kind of exciting.</p><p>But <strong>user needs are constant </strong>. People will always want interfaces that are intuitive, accessible, fast, and helpful. They’ll always appreciate experiences that respect their time and reduce their cognitive load. They’ll always prefer products that <em>just work </em>over products that are technically clever but frustrating to use.</p><p>So by all means, stay current with frameworks. Learn new tools. Experiment with cutting-edge technologies. But <strong>never let that learning eclipse the fundamental purpose of frontend engineering: building interfaces that serve people.</strong></p><p>Because at the end of the day, nobody’s going to remember which framework you used. They’re going to remember how your application made them feel. And <em>that’s </em>what matters.</p><p><em>Your users are waiting. They don’t care about your tech stack. They just want to get their work done. Are you going to help them, or are you going to spend another hour debating state management libraries? </em>🤔</p><p><strong>Choose wisely. </strong>🎯</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b0ed215a6e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The hardest part of growing from mid-level o Senior Frontend]]></title>
            <link>https://javascript.plainenglish.io/the-hardest-part-of-growing-from-mid-level-to-senior-frontend-ae5524564237?source=rss-a19b2612c09------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae5524564237</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[career-advice]]></category>
            <dc:creator><![CDATA[Sarah Gentil]]></dc:creator>
            <pubDate>Fri, 23 Jan 2026 16:18:20 GMT</pubDate>
            <atom:updated>2026-01-25T17:10:47.331Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GsdBZaUoiC_j6_E7JRysag.jpeg" /></figure><p>No one tells you this, so I will.</p><p>The hardest part of becoming a senior frontend engineer is not learning more frameworks.</p><p>It’s unlearning things.</p><p>And that hurts a little 🙂</p><h3>The mid-level comfort zone</h3><p>Mid-level is a great place to be.</p><p>You:</p><ul><li>know how things work</li><li>ship features</li><li>fix bugs with confidence</li><li>have opinions (lots of them)</li></ul><p>Your code works.<br>Your PRs get approved.<br>Life is good 😌</p><p>And then… things stop feeling that simple.</p><h3>Suddenly, being “right” is not enough ⚖️</h3><p>As a mid-level engineer, correctness is your superpower.</p><p>Does it work?<br>Are the tests passing?<br>Is the code clean?</p><p>As a senior, those are just the entry requirements.</p><p>Now people care about:</p><ul><li>why this approach</li><li>why now</li><li>why not something simpler</li><li>what happens in six months</li></ul><p>You can be technically right<br>and still make a bad decision.</p><p>That realization stings.</p><h3>You start seeing problems everywhere 👀</h3><p>At some point, you stop looking at features and start seeing consequences.</p><p>That small shortcut?<br>Future tech debt.</p><p>That “temporary” hack?<br>Permanent resident.</p><p>That missing edge case?<br>A production incident waiting to happen.</p><p>Ignorance was bliss.<br>Awareness is exhausting.</p><h3>The ego adjustment 😅</h3><p>This is a big one.</p><p>Mid-level growth is additive.<br>You learn more.<br>You do more.</p><p>Senior growth is subtractive.</p><p>You write less code.<br>You talk more.<br>You say “no” more often.</p><p>And sometimes your best contribution is a comment in a PR.</p><p>That can feel… underwhelming.</p><p>Especially when your identity was built around “I ship a lot”.</p><h3>You become responsible without being in charge 🧭</h3><p>Nobody announces it.</p><p>But suddenly:</p><ul><li>people ask for your opinion</li><li>juniors wait for your approval</li><li>decisions stick to you</li></ul><p>You’re not a manager.<br>You’re not the boss.</p><p>But things break and people look at you anyway 🤷‍♀️</p><p>Welcome to invisible responsibility.</p><h3>The uncertainty doesn’t go away 🌊</h3><p>Here’s the cruel joke.<br>You expect to feel more confident as you grow.</p><p>Instead, you become more aware of:</p><p><strong>trade-offs</strong><br> → choosing between performance and developer experience<br> → deciding when “good UX” is good enough given time constraints<br> → balancing accessibility improvements against delivery pressure</p><p><strong>unknowns</strong><br> → how real users will actually interact with the UI<br> → whether a design scales beyond the happy path<br> → how future requirements might break today’s assumptions</p><p><strong>risks</strong><br> → shipping a UI that works now but won’t scale in six months<br> → introducing technical debt to unblock a release<br> → over-engineering something that may not survive the next roadmap shift</p><p><strong>things you don’t control</strong><br> → last-minute scope changes<br> → evolving product priorities<br> → backend constraints, timelines, and dependencies</p><p>You stop saying <em>“this is the best solution”</em><br>and start saying <em>“this is probably good enough given our constraints.”</em></p><p>That’s not weakness.<br>That’s experience.</p><h3>Technical skills stop being the hard part 🗣️</h3><p>At some point, the challenge is no longer React, TypeScript, or testing.</p><p>It’s:</p><p><strong>communication</strong><br> → negotiating trade-offs between UX, performance, and delivery<br> → explaining technical constraints to designers without killing the vision<br> → clarifying impact when PMs propose “small” changes</p><p><strong>alignment</strong><br> → translating product goals into technical direction<br> → keeping design, product, and engineering focused on the same problem<br> → preventing teams from optimizing locally while missing the bigger picture</p><p><strong>mentoring</strong><br> → guiding juniors through <em>why</em> decisions are made, not just <em>how</em><br> → reviewing UI code with an eye for maintainability and scalability<br> → teaching when to push for quality and when to accept constraints</p><p><strong>explaining why something is a bad idea without sounding annoying</strong><br> → pushing back on scope while preserving trust<br> → offering alternatives instead of hard no’s<br> → protecting the product from short-term wins with long-term costs</p><p>No tutorial prepares you for that.</p><h3>You realize seniority is about trust 🤝</h3><p>Not titles.<br>Not years.<br>Not fancy code.</p><p><strong>Trust.</strong></p><p>Can people rely on your decisions?<br>Can they feel safe asking questions?<br>Can they trust you to think beyond the task?</p><p>That’s when things shift.</p><p>Quietly.<br>Without a badge.<br>Without a promotion email.</p><h3>The part no one warns you about</h3><p>The hardest part is accepting that growth feels uncomfortable.</p><p>That feeling of <em>“I don’t fully know what I’m doing”</em> does not disappear.</p><p>It just gets more sophisticated.</p><p>And that’s okay.</p><p>If growing from mid-level to senior feels weird, heavy, and slightly confusing…</p><p>Congrats.<br>You’re probably doing it right 💖</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae5524564237" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/the-hardest-part-of-growing-from-mid-level-to-senior-frontend-ae5524564237">The hardest part of growing from mid-level o Senior Frontend</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When NOT to use React Context, Zustand, Redux, or anything else ]]></title>
            <link>https://medium.com/@sarahizabelp/when-not-to-use-react-context-zustand-redux-or-anything-else-f3f1fbb2f3a7?source=rss-a19b2612c09------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3f1fbb2f3a7</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[zustand]]></category>
            <category><![CDATA[state-management]]></category>
            <dc:creator><![CDATA[Sarah Gentil]]></dc:creator>
            <pubDate>Thu, 22 Jan 2026 18:12:16 GMT</pubDate>
            <atom:updated>2026-01-22T18:36:10.321Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ad7P1y0Y3gbfPkv3850EQ.jpeg" /></figure><h3>When <strong>NOT</strong> to use React Context, Zustand, Redux, or anything else</h3><p>After almost 10 years working with frontend, I’ve learned something that sounds boring — but is actually liberating:</p><p>👉 <strong>Most state management problems are self-inflicted.</strong></p><p>We love tools. We love abstractions. We <em>really</em> love feeling smart by picking the “right” library.<br>But here’s the uncomfortable truth:</p><blockquote><strong><em>Choosing a state management solution is rarely the real problem.</em></strong></blockquote><p>Knowing <strong>when NOT to use one</strong> is.</p><p>So let’s talk about it. No dogma. No “X is bad”. Just experience.</p><h3>🚫 When NOT to use React Context</h3><p>React Context is often the <em>first hammer</em> we reach for. And suddenly… everything looks like a nail.</p><h3>Don’t use Context when:</h3><p>❌ <strong>Your state updates frequently</strong><br> Context re-renders <em>all consumers</em>. If your state changes a lot, congrats! You just created a silent performance tax 🧾</p><p>❌ <strong>You’re passing complex, mutable data</strong><br> Context works best for <em>configuration</em>, not dynamic app state.</p><p>❌ <strong>You’re using it as a global store</strong><br> Theme? Auth user? Locale? ✅<br> Form state, server cache, UI flags? 🚨</p><blockquote><em>Context is not a state manager.<br>It’s a dependency injection mechanism.</em></blockquote><p>If you’re stacking contexts inside contexts inside contexts… it’s already screaming.</p><h3>🚫 When NOT to use Zustand (or any lightweight store)</h3><p>I like Zustand. A lot.<br>But even good tools can be misused.</p><h3>Don’t use Zustand when:</h3><p>❌ <strong>The state is local to one component tree</strong><br> If only 2–3 components need it, lifting state is still cheaper than adding a store.</p><p>❌ <strong>You don’t have a clear ownership model</strong><br> When “any component can update anything”, chaos slowly sneaks in 🐍</p><p>❌ <strong>You’re just avoiding prop drilling</strong><br> Prop drilling is sometimes a <em>design smell</em>, not a technical problem.</p><blockquote><em>Global state should exist because the domain demands it. <br>Not because props are annoying.</em></blockquote><h3>🚫 When NOT to use Redux (or similar heavyweights)</h3><p>Redux has its place.<br>That place is <strong>not</strong> “every app needs it”.</p><h3>Don’t use Redux when:</h3><p>❌ <strong>Your app is small or medium-sized</strong><br> The boilerplate cost is real. Maintenance is real. Cognitive load is real.</p><p>❌ <strong>Your team doesn’t fully understand it</strong><br> Redux misused is worse than no Redux at all.</p><p>❌ <strong>You don’t have complex cross-domain state</strong><br> If your state doesn’t span multiple unrelated parts of the app… pause.</p><p>Redux shines when:</p><ul><li>state is complex</li><li>updates come from many sources</li><li>predictability really matters</li></ul><p>Otherwise, it’s just expensive confidence.</p><h3>🚫 When NOT to introduce any state management solution</h3><p>This is the big one 👇</p><h3>Don’t add a state library when:</h3><p>❌ <strong>You haven’t identified the real problem yet</strong><br> “Things feel messy” is not a requirement.</p><p>❌ <strong>Your issue is actually data fetching</strong><br> Server state ≠ client state.<br> If you’re syncing APIs, caching, retries… you probably need a <em>server-state</em> solution, not a global store.</p><p>❌ <strong>Your problem is communication, not state</strong><br> Many “state problems” are actually:</p><ul><li>unclear domain boundaries</li><li>bad component responsibilities</li><li>lack of conventions</li></ul><p>No library fixes that.</p><h3>🧠 What seniors learn (the hard way)</h3><p>After years of refactoring, rewriting, and regretting decisions, here’s what sticks:</p><p>✨ <strong>Local state is underrated</strong><br> ✨ <strong>Simple solutions age better</strong><br> ✨ <strong>Every abstraction has a cost</strong><br> ✨ <strong>Removing code is a skill</strong></p><p>The best state management solution is often…<br> 👉 <strong>the one you didn’t add</strong></p><h3>✅ A simple rule I use now</h3><p>Before introducing <em>any</em> state tool, I ask:</p><ol><li>Who owns this state?</li><li>Who needs to read it?</li><li>Who needs to change it?</li><li>How often does it change?</li><li>What happens if I remove this abstraction?</li></ol><p>If I can’t answer these clearly — I’m not ready for a global solution.</p><h3>Final thoughts 💭</h3><p>State management libraries are not bad.<br>But <strong>overusing them is</strong>.</p><p>Senior frontend engineering is less about knowing <em>what to add</em><br>and more about knowing <em>what to avoid</em>.</p><p>And honestly?<br>That’s where the real confidence lives 😌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3f1fbb2f3a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>