Uh oh!
There was an error while loading. Please reload this page.
Defer useDeferredValue updates in Gestures - #35511
Conversation
sebmarkbage
commented
Jan 14, 2026
I'm not actually sure this is better because the "previous" state is kind of arbitrary in these simulated environments. If you did an actual Transition at the end then that would not include this deferred value and you'd typically not see this state for those. But I think in the case where something is structured in such a way that you do have a shared deferred value that updates it probably makes sense to treat that similar to if you did a sync navigation since that's effective what the gesture has to be. |
react-sizebot
commented
Jan 14, 2026
Comparing: 4a3d993...9ab381c Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
Uh oh!
There was an error while loading. Please reload this page.
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. DiffTrain build for [eac3c95](eac3c95)
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.