-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
Reduce risk of leaving shipped Hooks as nullable on Dispatcher #32068
Conversation
@@ -834,6 +834,8 @@ export const HooksDispatcher: Dispatcher = supportsClientAPIs | |||
useActionState, | |||
useFormState: useActionState, | |||
useHostTransitionStatus, | |||
useMemoCache, | |||
useCacheRefresh, |
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 is available everywhere else.
Comparing: f0edf41...d12a451 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
e97a1e7
to
e3ddea6
Compare
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.
It really shouldn't be added everywhere since it's not an exposed API there's no reason to ship the bytes. A lot of the Cache stuff isn't gated properly.
e3ddea6
to
858c71f
Compare
I think we just accidentally shipped this because it was part of Should we reintroduce a new flag that's only on for experimental (React Devtools needs it)? Though |
…ook#32068) DiffTrain build for [886c5ad](facebook@886c5ad)
…ook#32068) DiffTrain build for [886c5ad](facebook@886c5ad)
…ook#32068) DiffTrain build for [886c5ad](facebook@886c5ad)
By grepping for the feature flag you're now directed to the Dispatcher type. Members are only nullable if they're behind a feature flag so we should make them non-nullable when the flag ships. There's still the possibility that types are not updated when the flag is on everywhere but cleanup should flush it out.