Skip to content

Commit

Permalink
Add Feature Flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Dec 17, 2024
1 parent 34ee391 commit 6eaff4c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/shared/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ export const enableLegacyFBSupport = false;
// likely to include in an upcoming release.
// -----------------------------------------------------------------------------

// Yield to the browser event loop and not just the scheduler event loop before passive effects.
export const enableYieldingBeforePassive = __EXPERIMENTAL__;

export const enableLegacyCache = __EXPERIMENTAL__;

export const enableAsyncIterableChildren = __EXPERIMENTAL__;
Expand Down
1 change: 1 addition & 0 deletions packages/shared/forks/ReactFeatureFlags.native-fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const syncLaneExpirationMs = 250;
export const transitionLaneExpirationMs = 5000;
export const useModernStrictMode = true;
export const enableHydrationLaneScheduling = true;
export const enableYieldingBeforePassive = true;

// Flow magic to verify the exports of this file match the original version.
((((null: any): ExportsType): FeatureFlagsType): ExportsType);
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.native-oss.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export const enableUseResourceEffectHook = false;

export const enableHydrationLaneScheduling = true;

export const enableYieldingBeforePassive = true;

// Profiling Only
export const enableProfilerTimer = __PROFILE__;
export const enableProfilerCommitHooks = __PROFILE__;
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.test-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export const enableSiblingPrerendering = true;

export const enableUseResourceEffectHook = false;

export const enableYieldingBeforePassive = true;

// TODO: This must be in sync with the main ReactFeatureFlags file because
// the Test Renderer's value must be the same as the one used by the
// react package.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const enableFabricCompleteRootInCommitPhase = false;
export const enableSiblingPrerendering = true;
export const enableUseResourceEffectHook = true;
export const enableHydrationLaneScheduling = true;
export const enableYieldingBeforePassive = true;

// Flow magic to verify the exports of this file match the original version.
((((null: any): ExportsType): FeatureFlagsType): ExportsType);
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@ export const enableUseResourceEffectHook = false;

export const enableHydrationLaneScheduling = true;

export const enableYieldingBeforePassive = true;

// Flow magic to verify the exports of this file match the original version.
((((null: any): ExportsType): FeatureFlagsType): ExportsType);
2 changes: 2 additions & 0 deletions packages/shared/forks/ReactFeatureFlags.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export const enableMoveBefore = false;
export const disableInputAttributeSyncing = false;
export const enableLegacyFBSupport = true;

export const enableYieldingBeforePassive = false;

export const enableHydrationLaneScheduling = true;

export const enableComponentPerformanceTrack = false;
Expand Down

0 comments on commit 6eaff4c

Please sign in to comment.