Type something to search...

Blog

useSyncExternalStore: Subscribing to External Data Sources Safely

useSyncExternalStore: Subscribing to External Data Sources Safely

Not all state lives in React. The browser knows whether you're online, how wide the window is, and what's in localStorage. A WebSocket client holds

Continue Reading
useId: Generating Stable IDs for Accessible Components

useId: Generating Stable IDs for Accessible Components

Accessible HTML runs on IDs. A <label> points at its input with htmlFor, an input points at its error message with aria-describedby, and a tab

Continue Reading
useTransition and useDeferredValue for Smoother UIs

useTransition and useDeferredValue for Smoother UIs

You type a letter into a search box and the whole page freezes for half a second. The input lags behind your fingers, characters appear in bursts, an

Continue Reading
Exploring the React use() Hook for Promises and Context

Exploring the React use() Hook for Promises and Context

For years, reading async data in a React component meant the same ritual: a useState for the data, another for loading, another for errors, and a `

Continue Reading
useLayoutEffect vs useEffect: Timing Differences That Matter

useLayoutEffect vs useEffect: Timing Differences That Matter

You build a tooltip that measures its own height and flips above the trigger if there isn't room below. It works, but every time it opens, there's a

Continue Reading
The Rules of Hooks Explained with Real-World Examples

The Rules of Hooks Explained with Real-World Examples

"Rendered more hooks than during the previous render." If you've seen that error, you've broken one of the rules of hooks. It usually happens in code

Continue Reading