Lesson 14
useDeferredValue Initial Config
Hiding the "Stale" State
The Shift: useDeferredValue is used to keep the UI responsive during heavy updates. Previously, you couldn't set an initial value, so the first render might show undefined or flash.
👀 Preview
useDeferredValue can now accept an initial value, preventing undefined flashes on first render.
📚 Explanation
`useDeferredValue` in React 19 accepts an optional second parameter for the initial value. This prevents undefined or flashy initial states, making the transition smoother and more predictable.
App.tsx
How well did you remember this?