Skip to content
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

fix[DevTools]: support useResourceEffect #32088

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

hoxyq
Copy link
Contributor

@hoxyq hoxyq commented Jan 16, 2025

Since we've started experimenting with it, I've started seeing a spike in errors:

Unsupported hook in the react-debug-tools package: Missing method in Dispatcher: useResourceEffect

Adding missing hook to the Dispatcher that is proxied by React DevTools.

I can't really add an example that will use it to our RDT testing shell, because it uses experimental builds of react, which don't have this hook. I've tested it manually by rebuilding artifacts with enableUseResourceEffectHook flag enabled.

Screenshot 2025-01-16 at 15 20 00

@react-sizebot
Copy link

Comparing: 89dbd48...63b43bc

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 = 514.24 kB 514.24 kB = 91.74 kB 91.73 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 = 556.18 kB 556.18 kB = 98.72 kB 98.72 kB
facebook-www/ReactDOM-prod.classic.js = 595.79 kB 595.79 kB = 104.85 kB 104.85 kB
facebook-www/ReactDOM-prod.modern.js = 586.21 kB 586.21 kB = 103.30 kB 103.30 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-debug-tools/cjs/react-debug-tools.development.js +1.35% 31.18 kB 31.60 kB +0.44% 5.67 kB 5.69 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.development.js +1.35% 31.18 kB 31.60 kB +0.44% 5.67 kB 5.69 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.development.js +1.35% 31.18 kB 31.60 kB +0.44% 5.67 kB 5.69 kB
oss-experimental/react-debug-tools/cjs/react-debug-tools.production.js +1.31% 27.79 kB 28.15 kB +0.51% 5.54 kB 5.56 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.production.js +1.31% 27.79 kB 28.15 kB +0.51% 5.54 kB 5.56 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.production.js +1.31% 27.79 kB 28.15 kB +0.51% 5.54 kB 5.56 kB

Generated by 🚫 dangerJS against 8e5e1dd

@hoxyq hoxyq merged commit 5b51a2b into facebook:main Jan 16, 2025
190 checks passed
@hoxyq hoxyq deleted the react-devtools/support-resource-effect branch January 16, 2025 15:42
@@ -943,6 +962,10 @@ function parseHookName(functionName: void | string): string {
startIndex += 'unstable_'.length;
}

if (functionName.slice(startIndex).startsWith('unstable_')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, missed this one

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