[crud] Add enableUseResourceEffectHook flag (#31556)

Adds a new feature flag for `enableUseResourceEffectHook`.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31556).
* #31523
* #31557
* __->__ #31556
* #31555
This commit is contained in:
lauren
2024-11-15 17:49:42 -05:00
committed by GitHub
parent d8afd1c82e
commit 7dd6b9e68a
9 changed files with 16 additions and 0 deletions

View File

@@ -161,6 +161,11 @@ export const transitionLaneExpirationMs = 5000;
*/
export const enableInfiniteRenderLoopDetection = false;
/**
* Experimental new hook for better managing resources in effects.
*/
export const enableUseResourceEffectHook = false;
// -----------------------------------------------------------------------------
// Ready for next major.
//

View File

@@ -25,3 +25,4 @@ export const enableShallowPropDiffing = __VARIANT__;
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
export const enableFabricCompleteRootInCommitPhase = __VARIANT__;
export const enableSiblingPrerendering = __VARIANT__;
export const enableUseResourceEffectHook = __VARIANT__;

View File

@@ -25,6 +25,7 @@ export const {
enableObjectFiber,
enablePersistedModeClonedFlag,
enableShallowPropDiffing,
enableUseResourceEffectHook,
passChildrenWhenCloningPersistedNodes,
enableSiblingPrerendering,
} = dynamicFlags;

View File

@@ -84,6 +84,7 @@ export const syncLaneExpirationMs = 250;
export const transitionLaneExpirationMs = 5000;
export const useModernStrictMode = true;
export const enableSiblingPrerendering = true;
export const enableUseResourceEffectHook = false;
// Profiling Only
export const enableProfilerTimer = __PROFILE__;

View File

@@ -83,6 +83,8 @@ export const renameElementSymbol = true;
export const enableShallowPropDiffing = false;
export const enableSiblingPrerendering = true;
export const enableUseResourceEffectHook = false;
// 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.

View File

@@ -80,6 +80,7 @@ export const transitionLaneExpirationMs = 5000;
export const useModernStrictMode = true;
export const enableFabricCompleteRootInCommitPhase = false;
export const enableSiblingPrerendering = true;
export const enableUseResourceEffectHook = false;
// Flow magic to verify the exports of this file match the original version.
((((null: any): ExportsType): FeatureFlagsType): ExportsType);

View File

@@ -94,5 +94,7 @@ export const enableOwnerStacks = false;
export const enableShallowPropDiffing = false;
export const enableSiblingPrerendering = true;
export const enableUseResourceEffectHook = false;
// Flow magic to verify the exports of this file match the original version.
((((null: any): ExportsType): FeatureFlagsType): ExportsType);

View File

@@ -42,6 +42,8 @@ export const enableSchedulingProfiler = __VARIANT__;
export const enableInfiniteRenderLoopDetection = __VARIANT__;
export const enableSiblingPrerendering = __VARIANT__;
export const enableUseResourceEffectHook = __VARIANT__;
// TODO: These flags are hard-coded to the default values used in open source.
// Update the tests so that they pass in either mode, then set these
// to __VARIANT__.

View File

@@ -31,6 +31,7 @@ export const {
enableSiblingPrerendering,
enableTransitionTracing,
enableTrustedTypesIntegration,
enableUseResourceEffectHook,
favorSafetyOverHydrationPerf,
renameElementSymbol,
retryLaneExpirationMs,