Frontend notes on React, TypeScript, and the web

Recent questions

  1. I Told AI "Just Build It" Instead of "Give Me Ideas"

    October 3, 2026, 12 min read, ai, developer

    Asking AI for creative ideas kept falling short across models. When I gave it three months of my logs and asked it to build something on its own, I got a tool I use every day. The difference was giving it evidence first and judging the result.

  2. If AI Can Do It All, What Can I Add?

    September 16, 2026, 16 min read, ai, developer

    If AI writes the code, what is my role? Looking back at development work and a one-off demo helped me explore what I need to understand and what I can contribute.

  3. How I turned bug reports into reproducible links

    August 31, 2026, 7 min read, frontend, url-state

    A case study of replacing written account and screen directions with URL state in a QA workflow, including why I ruled out localStorage, how I split responsibilities with TanStack Query, and what I tested.

  4. Does a global AGENTS.md really eat into the project-doc budget?

    August 15, 2026, 9 min read, ai, codex

    I understood project_doc_max_bytes to apply to the combined size of global and project documents, and wrote the same thing in my wiki. Measuring the model-visible prompt with codex debug prompt-input produced a different result. This post traces how I varied the limit, identified its scope, and retested the finding after the files changed.

  5. Why I separated data processing and UI responsibilities from React Query custom hooks

    July 21, 2026, 11 min read, react-query, frontend

    Server response mapping, error handling, cache synchronization, and UI feedback had become mixed inside custom hooks. This post explains how I reassigned them to React-independent data functions, query and mutation options, and components.

  6. I upgraded DOMPurify, so why did I end up fixing happy-dom?

    July 14, 2026, 17 min read, testing, dompurify

    After deleting pnpm-lock.yaml and reinstalling, caret-range packages all jumped at once and sanitize tests broke. I isolated them one by one and pinned DOMPurify as the culprit, but the same version was fine on jsdom. Here is how I separated the version from the environment and traced it down to the root cause.

  7. Why replacing window.confirm with a React Dialog is not just a UI swap

    July 9, 2026, 11 min read, react, frontend

    What broke when I replaced blocking window.confirm with a React Dialog. I learned to separate confirmation, cancellation, and execution into request/cancel/confirm flows.

  8. Why you should not start coding when you get a feature request

    May 26, 2026, 10 min read, frontend, spec

    How do you handle vague requests like "make it faster" or "make it prettier"?

  9. Why should good tests make failures believable?

    March 27, 2026, 10 min read, testing, vitest

    When tests in React Router or TanStack Query fail, I usually inspect my code first. When tests I wrote fail, I sometimes end up re-checking the test itself as well. That difference made me rethink the boundary between unit, integration, browser, and e2e tests.

  10. useRef holds values not needed for rendering, so why should you not read it during render?

    March 1, 2026, 6 min read, react, useRef

    Two sentences in the React docs looked contradictory at first. useRef stores values not needed for rendering, yet React says not to read ref.current during render. Tracing the source code shows these are about two different dimensions of rendering: trigger vs consistency, all the way to tearing.

  11. Why is Next.js source code so complex? -- The cost of keeping Pages Router

    February 21, 2026, 7 min read, nextjs, source-code

    Tracing just next/navigation through the source reveals where the complexity comes from: re-export entry points, context adapters, and .react-server.ts splits.

  12. Minor optimizations found in React source code

    February 13, 2026, 16 min read, react

    Small React source-level optimizations explained: Object.freeze in DEV, Hidden Class effects, branch ordering, and Smi/Double choices.

12 recent posts

Browse all 33 posts by topic and year