Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

Stacked on #35556 and #35559.

Given that we don't automatically clean up all view transition animations since #35337 and browsers are buggy, it's important that you clean up any Animation started manually from the events. However, there was no clean up function for when the View Transition is forced to stop. This also makes it harder to clean up custom timers etc too.

This lets you return a clean up function from all the events on <ViewTransition>.

@meta-cla meta-cla bot added the CLA Signed label Jan 19, 2026
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jan 19, 2026
@react-sizebot
Copy link

react-sizebot commented Jan 19, 2026

Comparing: a49952b...e7ff876

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 = 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js +0.04% 608.48 kB 608.73 kB +0.05% 107.60 kB 107.65 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js +0.10% 673.14 kB 673.79 kB +0.08% 118.33 kB 118.43 kB
facebook-www/ReactDOM-prod.classic.js +0.04% 693.87 kB 694.11 kB +0.04% 121.98 kB 122.02 kB
facebook-www/ReactDOM-prod.modern.js +0.04% 684.25 kB 684.50 kB +0.04% 120.37 kB 120.42 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.production.js +0.30% 38.34 kB 38.46 kB +0.39% 7.09 kB 7.12 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.production.js +0.30% 38.37 kB 38.48 kB +0.36% 7.12 kB 7.15 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.production.js +0.30% 38.37 kB 38.49 kB +0.36% 7.13 kB 7.15 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.production.js +0.30% 38.47 kB 38.58 kB +0.39% 7.11 kB 7.14 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.production.js +0.30% 38.49 kB 38.61 kB +0.38% 7.14 kB 7.17 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.production.js +0.30% 38.50 kB 38.62 kB +0.36% 7.15 kB 7.17 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.development.js +0.29% 42.65 kB 42.77 kB +0.38% 7.70 kB 7.73 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.development.js +0.29% 42.67 kB 42.80 kB +0.36% 7.73 kB 7.76 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.development.js +0.29% 42.68 kB 42.80 kB +0.36% 7.73 kB 7.76 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.29% 42.79 kB 42.91 kB +0.38% 7.72 kB 7.75 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.28% 42.81 kB 42.94 kB +0.36% 7.75 kB 7.78 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.28% 42.82 kB 42.94 kB +0.36% 7.75 kB 7.78 kB

Generated by 🚫 dangerJS against e7ff876

We need to fire the callbacks regardless of what stops it even if we
are not the one to stop it.
@sebmarkbage sebmarkbage merged commit c55ffb5 into facebook:main Jan 20, 2026
11 of 13 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 20, 2026
…ts (#35564)

Stacked on #35556 and #35559.

Given that we don't automatically clean up all view transition
animations since #35337 and browsers are buggy, it's important that you
clean up any `Animation` started manually from the events. However,
there was no clean up function for when the View Transition is forced to
stop. This also makes it harder to clean up custom timers etc too.

This lets you return a clean up function from all the events on
`<ViewTransition>`.

DiffTrain build for [c55ffb5](c55ffb5)
@sebmarkbage
Copy link
Collaborator Author

cc @eps1lon for DefinitelyTyped

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