-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Move useMemoCache hook to react/compiler-runtime #28954
Conversation
290712f
to
7f13ae3
Compare
d7bae39
to
e2aa58f
Compare
7fd1a59
to
50f76da
Compare
@@ -36,7 +36,7 @@ export const disableTextareaChildren = false; | |||
export const enableSuspenseAvoidThisFallback = false; | |||
export const enableSuspenseAvoidThisFallbackFizz = false; | |||
export const enableCPUSuspense = false; | |||
export const enableUseMemoCacheHook = true; | |||
export const enableUseMemoCacheHook = __EXPERIMENTAL__; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to match as a bundle test is using the test renderer and asserting this isn't available in non-experimental.
For Meta-internal purposes, we keep the export on `react` itself to reduce churn.
|
||
// export to match the name of the OSS function typically exported from | ||
// react/compiler-runtime | ||
export {useMemoCache as c} from './src/ReactHooks'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that's possible as useMemoCache adds an extra field to the fiber.
I think what we can look into is how this should look in the server build. We might iterate on that as the server build should probably have a noop use memo cache or not even use the transform.
Move useMemoCache hook to react/compiler-runtime For Meta-internal purposes, we keep the export on `react` itself to reduce churn. DiffTrain build for commit 4508873.
Full list of changes (not a public changelog): * fix[react-devtools/ci]: fix configurations for e2e testing ([hoxyq](https://github.com/hoxyq) in [#29016](#29016)) * feat[react-devtools]: display forget badge for components in profiling session ([hoxyq](https://github.com/hoxyq) in [#29014](#29014)) * fix[react-devtools]: add backwards compat with legacy element type symbol ([hoxyq](https://github.com/hoxyq) in [#28982](#28982)) * Expose "view source" options to Fusebox integration ([motiz88](https://github.com/motiz88) in [#28973](#28973)) * Enable inspected element context menu in Fusebox ([motiz88](https://github.com/motiz88) in [#28972](#28972)) * Check in `frontend.d.ts` for react-devtools-fusebox, include in build output ([motiz88](https://github.com/motiz88) in [#28970](#28970)) * Devtools: Fix build-for-devtools ([eps1lon](https://github.com/eps1lon) in [#28976](#28976)) * Move useMemoCache hook to react/compiler-runtime ([kassens](https://github.com/kassens) in [#28954](#28954)) * warn -> error for Test Renderer deprecation ([acdlite](https://github.com/acdlite) in [#28904](#28904)) * [react-dom] move all client code to `react-dom/client` ([gnoff](https://github.com/gnoff) in [#28271](#28271)) * Rename the react.element symbol to react.transitional.element ([sebmarkbage](https://github.com/sebmarkbage) in [#28813](#28813)) * Rename Forget badge ([jbonta](https://github.com/jbonta) in [#28858](#28858)) * Devtools: Add support for useFormStatus ([eps1lon](https://github.com/eps1lon) in [#28413](#28413))
Move useMemoCache hook to react/compiler-runtime
For Meta-internal purposes, we keep the export on
react
itself to reduce churn.