Repository: facebook/react
File: packages/shared/ReactFeatureFlags.js (JavaScript)

Code before:

export const enableCPUSuspense = __EXPERIMENTAL__;

// Test this at Meta before enabling.
export const enableNoCloningMemoCache = false;

export const enableUseEffectEventHook = __EXPERIMENTAL__;

// Test in www before enabling in open source.
// Enables DOM-server to stream its instruction set as data-attributes
// (handled with an MutationObserver) instead of inline-scripts
export const enableFizzExternalRuntime = __EXPERIMENTAL__;

export const alwaysThrottleRetries = true;

export const passChildrenWhenCloningPersistedNodes = false;

/**
 * Enables a new Fiber flag used in persisted mode to reduce the number
 * of cloned host components.
 */
export const enablePersistedModeClonedFlag = false;

export const enableShallowPropDiffing = false;

export const enableEagerAlternateStateNodeCleanup = false;

/**
 * Enables an expiration time for retry lanes to avoid starvation.
 */
export const enableRetryLaneExpiration = false;
export const retryLaneExpirationMs = 5000;
export const syncLaneExpirationMs = 250;
export const transitionLaneExpirationMs = 5000;

/**
 * Enables a new error detection for infinite render loops from updates caused
 * by setState or similar outside of the component owning the state.
 */
export const enableInfiniteRenderLoopDetection = false;

export const enableFastAddPropertiesInDiffing = true;
export const enableLazyPublicInstanceInFabric = false;

export const enableFragmentRefs = __EXPERIMENTAL__;

// -----------------------------------------------------------------------------
// Ready for next major.
//
// Alias __NEXT_MAJOR__ to __EXPERIMENTAL__ for easier skimming.
// -----------------------------------------------------------------------------

Review comment (bug):
This can be true here, as well as the other non-RN files. Since this only impacts RN, we don't need to set it to false. Makes it easier to roll out - and if it causes a test to fail somehow (it shouldn't) we'll catch it now instead of when trying to remove the flag

Code after:

export const enableCPUSuspense = __EXPERIMENTAL__;

// Test this at Meta before enabling.
export const enableNoCloningMemoCache = false;

export const enableUseEffectEventHook = __EXPERIMENTAL__;

// Test in www before enabling in open source.
// Enables DOM-server to stream its instruction set as data-attributes
// (handled with an MutationObserver) instead of inline-scripts
export const enableFizzExternalRuntime = __EXPERIMENTAL__;

export const alwaysThrottleRetries = true;

export const passChildrenWhenCloningPersistedNodes = false;

/**
 * Enables a new Fiber flag used in persisted mode to reduce the number
 * of cloned host components.
 */
export const enablePersistedModeClonedFlag = false;

export const enableShallowPropDiffing = false;

export const enableEagerAlternateStateNodeCleanup = true;

/**
 * Enables an expiration time for retry lanes to avoid starvation.
 */
export const enableRetryLaneExpiration = false;
export const retryLaneExpirationMs = 5000;
export const syncLaneExpirationMs = 250;
export const transitionLaneExpirationMs = 5000;

/**
 * Enables a new error detection for infinite render loops from updates caused
 * by setState or similar outside of the component owning the state.
 */
export const enableInfiniteRenderLoopDetection = false;

export const enableFastAddPropertiesInDiffing = true;
export const enableLazyPublicInstanceInFabric = false;

export const enableFragmentRefs = __EXPERIMENTAL__;

// -----------------------------------------------------------------------------
// Ready for next major.
//
// Alias __NEXT_MAJOR__ to __EXPERIMENTAL__ for easier skimming.
// -----------------------------------------------------------------------------