-
Notifications
You must be signed in to change notification settings - Fork 50.6k
[Fizz] Restore useMemoCache in renderers with support for Client APIs
#32067
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
Conversation
Mainly an oversight since we don't have types based off of feature flags. Now that `enableUseMemoCache` is shipped, `useMemoCache` can be non-nullable. Discovered during integration testing with Next.js where SSR threw with `TypeError: dispatcher.useMemoCache is not a function` but ultimately recovered due to client-side rendering.
|
Comparing: 453f5052569dafb52e82e875a8976cf348ed16d4...43df6362a8eae76827d7d6c5f6aad3b8475b325e Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
useMemoCache in renderers with support for Client APIsuseMemoCache in renderers with support for Client APIs
| useActionState, | ||
| useFormState: useActionState, | ||
| useHostTransitionStatus, | ||
| useMemoCache, |
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.
Should useCacheRefresh be added here too or not?
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.
See #32068
e.g. in
react-dom/server: https://codesandbox.io/p/sandbox/usememocache-react-dom-server-nkz4zc?file=%2Fsrc%2Findex.js%3A9%2C1Broke only recently in #31767. No stable release is affected
Summary
Mainly an oversight since we don't have types based off of feature flags. Now that
enableUseMemoCacheis shipped,useMemoCachecan be non-nullable.Discovered during integration testing with Next.js where SSR threw with
TypeError: dispatcher.useMemoCache is not a functionbut ultimately recovered due to client-side rendering.How did you test this change?
Hardened types.