Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

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.

@sebmarkbage sebmarkbage requested a review from acdlite January 14, 2026 23:35
@meta-cla meta-cla bot added the CLA Signed label Jan 14, 2026
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jan 14, 2026
@sebmarkbage
Copy link
Collaborator Author

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
Copy link

Comparing: 4a3d993...9ab381c

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB +0.11% 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 608.03 kB 607.61 kB = 107.61 kB 107.53 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB +0.05% 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 667.26 kB 666.83 kB = 117.51 kB 117.42 kB
facebook-www/ReactDOM-prod.classic.js = 693.38 kB 692.91 kB = 122.00 kB 121.92 kB
facebook-www/ReactDOM-prod.modern.js = 683.76 kB 683.34 kB = 120.40 kB 120.31 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 9ab381c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants