Mastering focus management with flushSync

#507 – May 25, 2025

how React's API solves focus management challenges

Mastering focus management with flushSync
5 minutes by Kent C. Dodds

In this article Kent explains how React's flushSync API solves focus management challenges in React applications. Due to React's batched rendering approach, attempting to focus elements immediately after state changes often fails because the DOM hasn't updated yet. flushSync provides a clean solution by forcing React to apply state updates immediately.

POST/CON 25: Build Smarter APIs for an AI-Driven World
sponsored by Postman

Join 2,000+ engineers at POST/CON 25, June 3 & 4 in LA, for deep dives on building scalable APIs, automating with Flows, and deploying AI-native systems. 30+ sessions, hands-on workshops, and zero fluff. Learn from Postman engineers and peers solving real-world problems. Register with code PMN50CAM1 for 50% off.

Concurrent Rendering
12 minutes by Ui

React v18 introduced concurrent rendering, a feature that took the React team over 5 years to develop. This fundamental change allows React to prioritize high-priority tasks over low-priority rendering work by making rendering interruptible. The article explains how this works through APIs like useDeferredValue and startTransition, which help developers create more responsive UIs by allowing React to defer non-urgent updates while prioritizing user interactions.

Build Your Own TanStack Query
less than one hour by Jaeuk Lim

Jaeuk brings a hands-on learning project that guides developers through rewriting the popular data-fetching library from scratch. The project covers core components like QueryClient and QueryCache, as well as React-specific hooks including useQuery and developer tools, all aimed at providing deeper understanding of TanStack Query's implementation.

The Limits of RSC: A practitioner's journey
3 minutes by Nir Tamir

Nir discusses limitations of using RSC as a data layer, particularly for implementing infinite scrolling. He presents an approach using useActionState but notes significant drawbacks including blocking server actions and complexity with shared state. After evaluating options, they ultimately migrated to react-query for centralized state management.

Building a React app with GitHub copilot
12 minutes by Kedasha Kerr

Kedasha demonstrates using GitHub Copilot to build a React frontend for a travel itinerary application. Her tutorial walks through creating authentication features, a dashboard with trip management functionality, and itinerary planning capabilities – all with AI's assistance.

Tests are dead. Meticulous AI is here.
sponsored by Meticulous

Meticulous automatically creates and maintains an exhaustive e2e UI test suite that covers every corner of your application – with no developer intervention required whatsoever. Dropbox, Lattice, Bilt Rewards and hundreds of organisations rely on Meticulous for their frontend testing. It is built from the Chromium level up with a deterministic scheduling engine – making it the only testing tool that eliminates flakes.

webdev

javascript

And the most popular article from the last issue was:

newsletters