Saved

Changelog

What's New

Every foundation, guide, and pattern on the site, newest first.

Follow along with the RSS feed

July 2026

  1. Pattern Response Regeneration Users can re-run a prompt for a different response, and the app keeps each earlier attempt as a variant they can switch back to.
  2. Pattern Stop Generation A stop button aborts a streaming model response with an AbortController, keeps the partial text, and stops the work on the server too.

June 2026

  1. Pattern Message Thread Storing a conversation as an ordered list of messages, each with a role and its own status, so streaming and errors only affect one turn.
  2. Pattern Prompt Input An auto-growing message composer where Enter sends and Shift+Enter adds a newline, with a send button that becomes a stop button while the model replies.
  3. Pattern Streaming Response A streaming response shows a language model's reply token by token as it arrives, so users don't have to wait for the whole reply to finish.
  4. Pattern Thinking Indicator A thinking indicator fills the pause between sending a prompt and the first token, and screen readers announce it until streamed text replaces it.
  5. Guide Managing AI Response States Patterns for handling the thinking and streaming states of a language model response, and the interruptions that can cut it short.
  6. Pattern Trusted Types Trusted Types makes dangerous DOM sinks like innerHTML reject plain strings, so DOM-based XSS can't get in through an unsanitized assignment.
  7. Pattern Secure Token Storage Keeping authentication tokens in httpOnly cookies with the Secure and SameSite flags stops injected scripts from stealing them.
  8. Pattern Subresource Integrity Integrity hashes on external scripts and stylesheets let the browser check that the files haven't been tampered with.
  9. Pattern SameSite Cookie The SameSite cookie attribute controls when browsers send cookies on cross-site requests, and it helps prevent CSRF attacks.
  10. Pattern Output Encoding Escaping data for the place it's rendered prevents XSS, because the browser then treats user input as plain text instead of running it as code.
  11. Pattern PII Redaction Removing or masking personally identifiable information before it gets into your logs, analytics, and error reports.
  12. Pattern Content Security Policy (CSP) An HTTP header that tells the browser where scripts and other resources can load from, so the browser can block XSS and other injection attacks.
  13. Pattern CSRF Protection Anti-CSRF tokens and SameSite cookies stop other sites from sending forged requests that use your logged-in users' cookies.
  14. Pattern Input Sanitization Validating user-provided data when it arrives and cleaning untrusted HTML before you render it, so your app is protected from injection attacks.
  15. Guide Securing Frontend Data Flows A defense-in-depth checklist for reducing the risk of client-side injection and protecting your users' data.

January 2026

  1. Guide Designing Component APIs Choosing between props, slots, render props, compound components, and other patterns when you're designing a component's interface.
  2. Guide Choosing a Networking Style for Realtime Apps Choosing between polling, Server-Sent Events, WebSockets, and CRDTs, depending on how realtime your app needs to be and whether users edit together.
  3. Guide Choosing a State Management Approach Choosing between local state, lifted state, dependency injection, and global state libraries, based on what your application needs.

December 2025

  1. Pattern Debounce Debouncing delays a function call until events have stopped for a short time, so a burst of rapid calls becomes a single call.
  2. Foundation Performance as a Foundation Performance belongs in the architecture from day one, instead of being bolted on after users start complaining.
  3. Pattern Client-Side Routing Client-side routing swaps views without a full page reload, so everything outside the swapped view keeps its state as users move between pages.
  4. Guide Choosing a CSS Strategy Choosing between BEM, CSS-in-JS, utility-first CSS, and CSS Modules for your team and your project.
  5. Pattern Code Splitting Splitting your app's code into smaller bundles that load on demand, so users download less before the first page becomes usable.
  6. Pattern CSS Modules & Scoped Styles CSS Modules and scoped styles keep each component's CSS to that component, so class names from different parts of an app can't conflict.

November 2025

  1. Pattern Lazy Loading Code and images that only load when users need them, so the first page loads faster and uses less bandwidth.
  2. Guide Testing Confidence Ladder Building the test suite for a modern frontend in layers, using unit, integration, visual, and accessibility tests.
  3. Pattern Component Testing Component tests check a component's behavior and output in isolation, so you find out about bugs before your users do.
  4. Pattern Memoization Caching the results of slow calculations lets your code skip recalculating them when the inputs haven't changed.
  5. Guide Managing Async UX States Patterns for handling loading and error states across your frontend.
  6. Pattern Async Boundary An async boundary shows one fallback UI while a group of asynchronous components and their data load, and then shows the group all at once.
  7. Pattern Loading State A loading state shows users that an asynchronous operation is still in progress, so they know the app is working.
  8. Pattern Retry Retrying failed requests automatically with exponential backoff, so users don't see errors for temporary network problems.
  9. Foundation The Progressive Enhancement Mindset With progressive enhancement, your web app keeps working for everyone, even when some of its code fails to load.
  10. Guide Building with Progressive Enhancement A guide to building web applications that keep working for everyone, whatever their browser supports.

October 2025

  1. Foundation Resilience by Design Systems keep working when things fail if you design for failure and recovery from the start, instead of adding error handling at the end.
  2. Pattern Error Boundary An error boundary catches JavaScript errors in part of your component tree and shows a fallback UI, so the rest of the app keeps working.
  3. Pattern Error Handling Catching errors from failed API requests and showing users a clear message about what went wrong and what they can do next.
  4. Pattern Accessible Forms Forms with proper labels and announced error messages, so screen reader users and keyboard users can fill them in too.
  5. Pattern ARIA Roles and Attributes ARIA roles and attributes give assistive technologies the information they need about custom widgets when HTML elements can't describe them.
  6. Pattern Focus Trap A focus trap keeps keyboard focus inside a modal dialog or overlay, so pressing Tab can't move focus to the page behind it.
  7. Pattern Live Regions ARIA live regions let screen readers announce content that changes on the page, without moving the user's focus.
  8. Foundation Accessibility as a Foundation Accessibility belongs in your architecture from day one, instead of being retrofitted later.
  9. Guide Accessible Interaction Playbook Making interactive UI accessible, with focus management, keyboard support, and screen reader announcements.
  10. Pattern Focus Management Moving keyboard focus to the right place when the UI changes, such as when a modal dialog opens or the route changes.
  11. Pattern Keyboard Navigation Keyboard navigation lets people who can't or don't use a mouse or other pointing device operate your whole interface with the keyboard.
  12. Pattern Semantic HTML Semantic HTML uses the right element for each part of a page, so browsers and screen readers understand its structure before you add any ARIA attributes.

September 2025

  1. Guide Choosing a Frontend Framework The criteria I use to choose between React, Vue, Svelte, Angular, and other frontend frameworks on real projects.
  2. Pattern Component Lifecycle Setting things up when a component mounts, and cleaning them up again when it updates or unmounts, prevents memory leaks and stale data.
  3. Pattern Presentational vs. Container Presentational components render the UI, and container components manage the data and business logic behind it.
  4. Pattern Props and Attributes Components get their data and configuration from the outside, through properties or attributes.
  5. Pattern Pure Component Components that render the same output for the same inputs, with no side effects, so memoization works and tests are predictable.
  6. Foundation Component-Driven Architecture Frontend development has moved from building whole pages to building interfaces out of small, reusable components.
  7. Foundation Logical Separation of Concerns Component-based architectures still separate concerns, but they separate frontend code by feature instead of by technology.
  8. Pattern Barrel Export Index files that re-export a directory's modules from one entry point, so import paths are shorter and the directory has a clear public API.
  9. Pattern Separation of Concerns Splitting code into separate layers for data, logic, presentation, and styling makes an app easier to change.
  10. Pattern Single Responsibility With single responsibility, each component or function has one clear purpose and only one reason to change.