Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

Stacked on #35487.

This is slightly different because the first suspended commit is on blockers that prevent us from committing which still needs to be resolved first.

If a gesture lane has to be rerendered while the gesture is happening then it reenters this state with a new tree. (Currently this doesn't happen for a ping I think which is not really how it usually works but better in this case.)

Instead of keeping track of which gestures to stop during the next commit,
we instead track on the pending gesture whether that gesture should commit
that lane next time we get there in the React commit sequence.
When completing a root we can apply the gesture which starts the animation
but it's not committed. We mark the lane as suspended at that point.
This will rerender the gesture lane and then commit it which stops the
gesture. After that any Transitions can be applied on top.
…commits

This part doesn't animate until we release.
@react-sizebot
Copy link

react-sizebot commented Jan 14, 2026

Comparing: 4a3d993...29fd03b

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.05% 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 608.03 kB 607.88 kB = 107.61 kB 107.59 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 +0.46% 667.26 kB 670.35 kB +0.41% 117.51 kB 118.00 kB
facebook-www/ReactDOM-prod.classic.js = 693.38 kB 693.21 kB = 122.00 kB 121.97 kB
facebook-www/ReactDOM-prod.modern.js = 683.76 kB 683.63 kB = 120.40 kB 120.36 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.js Deleted 265.03 kB 0.00 kB Deleted 48.56 kB 0.00 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-client.browser.production.js Deleted 60.43 kB 0.00 kB Deleted 11.71 kB 0.00 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js Deleted 73.52 kB 0.00 kB Deleted 14.20 kB 0.00 kB
oss-experimental/react-server/cjs/react-server.production.js Deleted 148.76 kB 0.00 kB Deleted 26.28 kB 0.00 kB
oss-experimental/react/cjs/react-compiler-runtime.development.js Deleted 1.09 kB 0.00 kB Deleted 0.65 kB 0.00 kB
oss-experimental/scheduler/cjs/scheduler.native.development.js Deleted 12.14 kB 0.00 kB Deleted 2.51 kB 0.00 kB
oss-experimental/use-subscription/cjs/use-subscription.production.js Deleted 0.43 kB 0.00 kB Deleted 0.30 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.js +0.58% 564.15 kB 567.42 kB +0.67% 87.75 kB 88.34 kB
oss-experimental/react-art/cjs/react-art.development.js +0.57% 729.74 kB 733.87 kB +0.68% 114.68 kB 115.46 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.js +0.52% 488.70 kB 491.24 kB +0.53% 77.71 kB 78.12 kB
oss-experimental/react-dom/cjs/react-dom-profiling.profiling.js +0.50% 745.88 kB 749.63 kB +0.55% 128.84 kB 129.55 kB
oss-experimental/react-reconciler/cjs/react-reconciler.development.js +0.48% 857.88 kB 861.98 kB +0.53% 133.50 kB 134.21 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js +0.46% 667.26 kB 670.35 kB +0.41% 117.51 kB 118.00 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.production.js +0.45% 681.67 kB 684.76 kB +0.38% 121.07 kB 121.53 kB
oss-experimental/react-dom/cjs/react-dom-client.development.js +0.38% 1,241.07 kB 1,245.76 kB +0.41% 206.04 kB 206.88 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.development.js +0.37% 1,257.62 kB 1,262.31 kB +0.39% 209.73 kB 210.54 kB
oss-experimental/react-dom/cjs/react-dom-profiling.development.js +0.37% 1,257.62 kB 1,262.31 kB +0.41% 208.89 kB 209.75 kB
oss-experimental/react-art/cjs/react-art.production.js +0.30% 357.47 kB 358.53 kB +0.37% 60.22 kB 60.45 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.js Deleted 265.03 kB 0.00 kB Deleted 48.56 kB 0.00 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-client.browser.production.js Deleted 60.43 kB 0.00 kB Deleted 11.71 kB 0.00 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js Deleted 73.52 kB 0.00 kB Deleted 14.20 kB 0.00 kB
oss-experimental/react-server/cjs/react-server.production.js Deleted 148.76 kB 0.00 kB Deleted 26.28 kB 0.00 kB
oss-experimental/react/cjs/react-compiler-runtime.development.js Deleted 1.09 kB 0.00 kB Deleted 0.65 kB 0.00 kB
oss-experimental/scheduler/cjs/scheduler.native.development.js Deleted 12.14 kB 0.00 kB Deleted 2.51 kB 0.00 kB
oss-experimental/use-subscription/cjs/use-subscription.production.js Deleted 0.43 kB 0.00 kB Deleted 0.30 kB 0.00 kB

Generated by 🚫 dangerJS against 29fd03b

startTransition(action);
}
// We cancel the gesture before invoking side-effects to allow the gesture lane to fully commit
// before scheduling new updates.
Copy link
Collaborator Author

@sebmarkbage sebmarkbage Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might actually be wrong because it wouldn't know what to entangle with until later. Nevermind this works because we entangle all transitions in the same event.

This is equivalent to the "Commit" phase in the regular phases but it's
creating a "ghost" DOM tree that's a partial clone of the old one that's
immediately deleted.
This ensures that we log the end state of the Animating track which
otherwise is ignored inside a commit phase.
@sebmarkbage
Copy link
Collaborator Author

I also pushed some commits related to performance track logging of these new types of phases and gaps.

@sebmarkbage sebmarkbage changed the title Optimize gesture by allowing the original work in progress tree to be a suspended comimt Optimize gesture by allowing the original work in progress tree to be a suspended commit Jan 15, 2026
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.

3 participants