@samitouri / QOS-React-2 / commits / eac3c95537

Defer useDeferredValue updates in Gestures (#35511)

If an initial value is specified, then it's always used regardless as part of the gesture render. If a gesture render causes an update, then previously that was not treated as deferred and could therefore be blocking the render. However, a gesture is supposed to flush synchronously ideally. Therefore we should consider these as urgent. The effect is that useDeferredValue renders the previous state.

Sebastian Markbåge committed Jan 15, 2026 at 20:46 UTC eac3c9553708cbf53a0c148b45e1de1ab6f84b12
1 file changed +2 -1
packages/react-reconciler/src/ReactFiberLane.js
+2 -1
@@ -621,7 +621,8 @@ export function includesOnlyRetries(lanes: Lanes): boolean {
621 export function includesOnlyNonUrgentLanes(lanes: Lanes): boolean {
622 // TODO: Should hydration lanes be included here? This function is only
623 // used in `updateDeferredValueImpl`.
624 - const UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;
624 + const UrgentLanes =
625 + SyncLane | InputContinuousLane | DefaultLane | GestureLane;
626 return (lanes & UrgentLanes) === NoLanes;
627 }
628 export function includesOnlyTransitions(lanes: Lanes): boolean {