Skip to content

Commit

Permalink
[RN] Use microtasks when using bridgeless mode in React Native Fabric…
Browse files Browse the repository at this point in the history
… renderer (OSS version)
  • Loading branch information
rubennorte committed Feb 29, 2024
1 parent 01ab35a commit 28e6d89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,5 +533,7 @@ module.exports = {
AsyncLocalStorage: 'readonly',
async_hooks: 'readonly',
globalThis: 'readonly',

RN$Bridgeless: 'readonly',
},
};
5 changes: 4 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.native-oss.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ export const enableAsyncActions = false;

export const alwaysThrottleRetries = false;

export const useMicrotasksForSchedulingInFabric = false;
const isBridgeless: boolean =
typeof RN$Bridgeless !== 'undefined' && !!RN$Bridgeless;

export const useMicrotasksForSchedulingInFabric = isBridgeless;
export const passChildrenWhenCloningPersistedNodes = false;
export const enableUseDeferredValueInitialArg = __EXPERIMENTAL__;
export const disableClientCache = true;
Expand Down
3 changes: 3 additions & 0 deletions scripts/flow/xplat.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
* @flow
*/

// eslint-disable-next-line no-unused-vars
declare const RN$Bridgeless: boolean;

declare module 'ReactNativeInternalFeatureFlags' {
declare export var alwaysThrottleRetries: boolean;
declare export var enableComponentStackLocations: boolean;
Expand Down

0 comments on commit 28e6d89

Please sign in to comment.