Skip to content

Add plumbing for onDefaultTransitionIndicator #33150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 9, 2025

Conversation

sebmarkbage
Copy link
Collaborator

This just adds the options at the root and wire it up to the root but it doesn't do anything yet.

@sebmarkbage sebmarkbage requested a review from rickhanlonii May 7, 2025 22:07
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label May 7, 2025
@@ -75,6 +84,11 @@ class Surface extends React.Component {
false,
false,
'',
defaultOnUncaughtError,
defaultOnCaughtError,
defaultOnRecoverableError,
Copy link
Collaborator Author

@sebmarkbage sebmarkbage May 7, 2025

Choose a reason for hiding this comment

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

These were missing in ART so any errors would've logged like onUncaughtError is undefined instead of the error. Probably not heavily used.

Probably should have a test for errors in ART.

@react-sizebot
Copy link

react-sizebot commented May 7, 2025

Comparing: ac06829...9bf83c2

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.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 528.26 kB 528.13 kB +0.02% 93.16 kB 93.18 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js +0.05% 646.11 kB 646.45 kB +0.04% 113.67 kB 113.72 kB
facebook-www/ReactDOM-prod.classic.js +0.04% 674.81 kB 675.07 kB +0.04% 118.51 kB 118.57 kB
facebook-www/ReactDOM-prod.modern.js +0.04% 665.09 kB 665.35 kB +0.05% 116.91 kB 116.96 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.67% 38.39 kB 38.65 kB +0.44% 7.09 kB 7.12 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.production.js +0.67% 38.42 kB 38.67 kB +0.44% 7.12 kB 7.15 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.production.js +0.67% 38.42 kB 38.68 kB +0.44% 7.12 kB 7.15 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.production.js +0.66% 38.52 kB 38.78 kB +0.44% 7.11 kB 7.14 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.production.js +0.66% 38.55 kB 38.80 kB +0.43% 7.14 kB 7.17 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.production.js +0.66% 38.55 kB 38.81 kB +0.43% 7.14 kB 7.17 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.development.js +0.62% 42.70 kB 42.97 kB +0.44% 7.69 kB 7.73 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.development.js +0.62% 42.73 kB 42.99 kB +0.44% 7.72 kB 7.76 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.development.js +0.62% 42.73 kB 43.00 kB +0.44% 7.73 kB 7.76 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.62% 42.84 kB 43.11 kB +0.44% 7.71 kB 7.75 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.62% 42.87 kB 43.13 kB +0.44% 7.74 kB 7.78 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.62% 42.87 kB 43.14 kB +0.44% 7.74 kB 7.78 kB
oss-stable-semver/react-art/cjs/react-art.development.js +0.53% 571.13 kB 574.14 kB +0.72% 91.16 kB 91.82 kB
oss-stable/react-art/cjs/react-art.development.js +0.53% 571.20 kB 574.22 kB +0.72% 91.18 kB 91.84 kB
oss-experimental/react-art/cjs/react-art.development.js +0.46% 666.91 kB 669.99 kB +0.64% 104.81 kB 105.48 kB
facebook-www/ReactART-dev.modern.js +0.42% 720.28 kB 723.30 kB +0.58% 111.61 kB 112.25 kB
facebook-www/ReactART-dev.classic.js +0.41% 729.78 kB 732.80 kB +0.58% 113.35 kB 114.01 kB

Generated by 🚫 dangerJS against 9bf83c2

@sebmarkbage sebmarkbage force-pushed the transitionindicator branch from f4a257a to 022a4b9 Compare May 7, 2025 22:39
@@ -80,6 +80,7 @@ type CreateRootOptions = {
unstable_transitionCallbacks?: TransitionTracingCallbacks,
onUncaughtError?: (error: mixed, errorInfo: {componentStack: string}) => void,
onCaughtError?: (error: mixed, errorInfo: {componentStack: string}) => void,
onDefaultTransitionIndicator?: () => () => void,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should the destroy be optional?

Typically you probably need it but if you use optimistic state then you don’t.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Made it optional

@sebmarkbage sebmarkbage merged commit 9b79292 into facebook:main May 9, 2025
239 checks passed
github-actions bot pushed a commit that referenced this pull request May 9, 2025
This just adds the options at the root and wire it up to the root but it
doesn't do anything yet.

DiffTrain build for [9b79292](9b79292)
github-actions bot pushed a commit that referenced this pull request May 9, 2025
This just adds the options at the root and wire it up to the root but it
doesn't do anything yet.

DiffTrain build for [9b79292](9b79292)
sebmarkbage added a commit that referenced this pull request May 9, 2025
Stacked on #33150.

We use `noop` functions in a lot of places as place holders. I don't
think there's any real optimizations we get from having separate
instances. This moves them to use a common instance in `shared/noop`.
github-actions bot pushed a commit that referenced this pull request May 9, 2025
Stacked on #33150.

We use `noop` functions in a lot of places as place holders. I don't
think there's any real optimizations we get from having separate
instances. This moves them to use a common instance in `shared/noop`.

DiffTrain build for [21fdf30](21fdf30)
github-actions bot pushed a commit that referenced this pull request May 9, 2025
Stacked on #33150.

We use `noop` functions in a lot of places as place holders. I don't
think there's any real optimizations we get from having separate
instances. This moves them to use a common instance in `shared/noop`.

DiffTrain build for [21fdf30](21fdf30)
github-actions bot pushed a commit to code/lib-react that referenced this pull request May 9, 2025
Stacked on facebook#33150.

We use `noop` functions in a lot of places as place holders. I don't
think there's any real optimizations we get from having separate
instances. This moves them to use a common instance in `shared/noop`.

DiffTrain build for [21fdf30](facebook@21fdf30)
github-actions bot pushed a commit to code/lib-react that referenced this pull request May 9, 2025
Stacked on facebook#33150.

We use `noop` functions in a lot of places as place holders. I don't
think there's any real optimizations we get from having separate
instances. This moves them to use a common instance in `shared/noop`.

DiffTrain build for [21fdf30](facebook@21fdf30)
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.

4 participants