mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
Clean up flag to enable microtasks in RN (#37021)
## Summary Microtasks are enabled by default in RN already, so there's no need to gate their use in Fabric atm. ## How did you test this change? Existing tests. Tested e2e at Meta.
This commit is contained in:
@@ -464,7 +464,6 @@ module.exports = {
|
||||
files: ['packages/react-native-renderer/**/*.js'],
|
||||
globals: {
|
||||
nativeFabricUIManager: 'readonly',
|
||||
RN$enableMicrotasksInReact: 'readonly',
|
||||
RN$isNativeEventTargetEventDispatchingEnabled: 'readonly',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -947,9 +947,7 @@ export function resetFormInstance(form: Instance): void {}
|
||||
// Microtasks
|
||||
// -------------------
|
||||
|
||||
export const supportsMicrotasks: boolean =
|
||||
typeof RN$enableMicrotasksInReact !== 'undefined' &&
|
||||
!!RN$enableMicrotasksInReact;
|
||||
export const supportsMicrotasks: boolean = true;
|
||||
|
||||
export const scheduleMicrotask: any =
|
||||
typeof queueMicrotask === 'function' ? queueMicrotask : scheduleTimeout;
|
||||
|
||||
-3
@@ -127,9 +127,6 @@ declare module 'react-native' {
|
||||
declare export type MeasureOnSuccessCallback = __MeasureOnSuccessCallback;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
declare const RN$enableMicrotasksInReact: boolean;
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
declare const RN$isNativeEventTargetEventDispatchingEnabled:
|
||||
| (() => boolean)
|
||||
|
||||
@@ -46,8 +46,6 @@ module.exports = {
|
||||
// Fabric. See https://github.com/facebook/react/pull/15490
|
||||
// for more information
|
||||
nativeFabricUIManager: 'readonly',
|
||||
// RN flag to enable microtasks
|
||||
RN$enableMicrotasksInReact: 'readonly',
|
||||
RN$isNativeEventTargetEventDispatchingEnabled: 'readonly',
|
||||
// Trusted Types
|
||||
trustedTypes: 'readonly',
|
||||
|
||||
Reference in New Issue
Block a user