-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Remove enableAsyncActions #31757
Remove enableAsyncActions #31757
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
4b4420e
to
2fe57eb
Compare
2fe57eb
to
038fdfb
Compare
# Conflicts: # packages/react-server/src/ReactFizzHooks.js
useHostTransitionStatus: (unsupportedHook: any), | ||
useOptimistic: (unsupportedHook: any), | ||
useFormState: (unsupportedHook: any), | ||
useActionState: (unsupportedHook: any), |
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.
@sebmarkbage could you double check this? I don't think the flight dispatcher had these hooks defined before as unsupported.
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.
Yea, it doesn't really need it because the outer export shouldn't be available in that environment. This is just protecting against a misconfigured environment but it's good to have that backup so you know why.
if (typeof Dispatcher.useActionState === 'function') { | ||
// This type check is for Flow only. | ||
Dispatcher.useActionState((s: mixed, p: mixed) => s, null); | ||
} |
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 one is used by react-devtools on older versions of React so this check must still remain.
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.
Got it, so the comment about only being for Flow is wrong haha
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.
Actually no I'm wrong. This is the local dispatcher. Not the dispatcher ref.
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.
Confirmed that this is the internal dispatcher, not the one in devtools
Based off #31757 This has landed everywhere.
Based on #31756
This is landed everywhere