useTransitionlets you mark certain state updates as non-urgent, allowing React to keep the UI responsive while those updates are processed in the background.
const [isPending, startTransition] = useTransition()
It returns:
startTransition → wraps low-priority updatesisPending → tells you if a transition is in progressWithout transitions, every update blocks rendering:
setFilter(value) // slow update blocks typing
If filtering is expensive, the input lags — bad UX.
const [isPending, startTransition] = useTransition()function onChange(e) {const value = e.target.valuestartTransition(() => {setFilter(value)})}
✔ Typing stays smooth.
✔ Heavy updates run in the background.
✔ UI feels faster.
useTransition doesn’t make your code faster —
it makes your UI feel faster.
Use it wisely, and your React apps will feel:
Use useTransition for: