Writing
I write short notes on tools and habits that help with day-to-day engineering.
2026
- Observe sibling nodes with Fragment refsAttach one IntersectionObserver to sibling elements with a React Fragment ref and keep both list items direct children of their list.
- Publish a post from Notion without a deploySee how this site used to publish from Notion with server-side fetching, caching and a local fallback.
- Slide forward and back with addTransitionTypeTag React navigation updates with addTransitionType so forward and back use different slide directions, even when they lead to the same screen.
- Animate route changes with React ViewTransitionUse React ViewTransition to fade between client-side routes and carry a shared cover from a catalog thumbnail into its detail view.
- Add trailers during a rebaseAdd a co-author trailer to each replayed commit with git rebase, and skip duplicate lines with addIfDifferent.
- Scope component styles with @scope@scope (.card) to (.card-content) keeps a card's img and p rules out of the HTML slotted inside it, without raising specificity.
- Guard innerHTML with Trusted TypesEnforce Trusted Types for an innerHTML preview, let a named policy return fixed markup, and insert the summary as text.
- Move from ESLint 9 to ESLint 10Find the effective config after ESLint 10 changes file lookup, then remove the old lookup flag and migrate remaining eslintrc files.
- Pick a diff algorithm for git blameCompare Myers and Histogram on a reordered file, then inspect the commit before attributing a line to the author of the move.
- Keep meeting times across DST with TemporalUse Temporal.ZonedDateTime to move a meeting by one calendar day across daylight saving time, then convert it for an attendee.
- Intercept SPA routes with the Navigation APIUse one navigate handler for link clicks and Back while preserving direct loads and normal navigation outside your routes.
- Add months with Temporal.PlainDateKeep the original billing date as the anchor for month-end renewals, then compare calendar dates with Temporal.PlainDate.
- Open dialogs with command and commandforConnect a button to a dialog or popover by ID, then check its keyboard behavior and provide a path for older browsers.
- Check your React Server Components patchesCheck the deployed Next.js or React Server Components package versions against the initial security fixes and later advisories.
- Find the last commit for each fileUse git last-modified to find the latest commit for each file in a directory, at HEAD or in an older committed tree.
- Choose jsdom or Browser Mode in Vitest 4Keep DOM assertions in jsdom and move layout checks to a Chromium project in Vitest 4, using one toolbar test to see the difference.
- Use localStorage in Node scriptsPersist a small key-value counter across Node processes with localStorage and an explicit backing file, and know when to use another store.
- Replace Corepack after Node 25Install Corepack on Node 25, enable its pnpm shim, and use the packageManager pin to reproduce a frozen install in CI.
- Cross-fade a same-document view transitionCross-fade an order list and a detail pane with startViewTransition, and keep the same DOM update for browsers and readers who skip motion.
- Why React Compiler 1.0 skips componentsRead React Compiler diagnostics in ESLint, then check the build log to confirm which components compile after you fix the reported line.