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:
Rubén Norte
2026-07-15 13:21:31 +01:00
committed by GitHub
parent 82e730d8d2
commit c49275ba14
4 changed files with 1 additions and 9 deletions
-1
View File
@@ -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
View File
@@ -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)
-2
View File
@@ -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',