mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
a94838df1c
This removes the automatic patching of the global `fetch` function in Server Components environments to dedupe requests using `React.cache`, a behavior that some RSC framework maintainers have objected to. We may revisit this decision in the future, but for now it's not worth the controversy. Frameworks that have already shipped this behavior, like Next.js, can reimplement it in userspace. I considered keeping the implementation in the codebase and disabling it by setting `enableFetchInstrumentation` to `false` everywhere, but since that also disables the tests, it doesn't seem worth it because without test coverage the behavior is likely to drift regardless. We can just revert this PR later if desired.
102 lines
4.0 KiB
JavaScript
102 lines
4.0 KiB
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags';
|
|
import typeof * as ExportsType from './ReactFeatureFlags.test-renderer';
|
|
|
|
export const debugRenderPhaseSideEffectsForStrictMode = false;
|
|
export const enableDebugTracing = false;
|
|
export const enableAsyncDebugInfo = false;
|
|
export const enableSchedulingProfiler = false;
|
|
export const enableProfilerTimer = __PROFILE__;
|
|
export const enableProfilerCommitHooks = __PROFILE__;
|
|
export const enableProfilerNestedUpdatePhase = __PROFILE__;
|
|
export const enableUpdaterTracking = false;
|
|
export const enableCache = true;
|
|
export const enableLegacyCache = __EXPERIMENTAL__;
|
|
export const enableBinaryFlight = true;
|
|
export const enableFlightReadableStream = true;
|
|
export const enableAsyncIterableChildren = false;
|
|
export const enableTaint = true;
|
|
export const enablePostpone = false;
|
|
export const disableCommentsAsDOMContainers = true;
|
|
export const disableInputAttributeSyncing = false;
|
|
export const disableIEWorkarounds = true;
|
|
export const enableScopeAPI = false;
|
|
export const enableCreateEventHandleAPI = false;
|
|
export const enableSuspenseCallback = false;
|
|
export const enableTrustedTypesIntegration = false;
|
|
export const disableTextareaChildren = false;
|
|
export const enableSuspenseAvoidThisFallback = false;
|
|
export const enableSuspenseAvoidThisFallbackFizz = false;
|
|
export const enableCPUSuspense = false;
|
|
export const enableUseMemoCacheHook = true;
|
|
export const enableNoCloningMemoCache = false;
|
|
export const enableUseEffectEventHook = false;
|
|
export const favorSafetyOverHydrationPerf = true;
|
|
export const enableComponentStackLocations = true;
|
|
export const enableLegacyFBSupport = false;
|
|
export const enableFilterEmptyStringAttributesDOM = true;
|
|
export const enableGetInspectorDataForInstanceInProduction = false;
|
|
|
|
export const enableRetryLaneExpiration = false;
|
|
export const retryLaneExpirationMs = 5000;
|
|
export const syncLaneExpirationMs = 250;
|
|
export const transitionLaneExpirationMs = 5000;
|
|
|
|
export const disableSchedulerTimeoutInWorkLoop = false;
|
|
export const enableLazyContextPropagation = false;
|
|
export const enableLegacyHidden = false;
|
|
export const forceConcurrentByDefaultForTesting = false;
|
|
export const enableUnifiedSyncLane = __EXPERIMENTAL__;
|
|
export const allowConcurrentByDefault = false;
|
|
|
|
export const consoleManagedByDevToolsDuringStrictMode = false;
|
|
|
|
export const enableTransitionTracing = false;
|
|
|
|
export const useModernStrictMode = false;
|
|
export const enableDO_NOT_USE_disableStrictPassiveEffect = false;
|
|
export const enableFizzExternalRuntime = true;
|
|
export const enableDeferRootSchedulingToMicrotask = true;
|
|
|
|
export const enableAsyncActions = true;
|
|
|
|
export const alwaysThrottleRetries = true;
|
|
|
|
export const passChildrenWhenCloningPersistedNodes = false;
|
|
export const enableUseDeferredValueInitialArg = __EXPERIMENTAL__;
|
|
export const disableClientCache = true;
|
|
|
|
export const enableServerComponentKeys = true;
|
|
export const enableServerComponentLogs = true;
|
|
export const enableInfiniteRenderLoopDetection = false;
|
|
export const enableEarlyReturnForPropDiffing = false;
|
|
|
|
export const renameElementSymbol = 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.
|
|
//
|
|
// We really need to get rid of this whole module. Any test renderer specific
|
|
// flags should be handled by the Fiber config.
|
|
// const __NEXT_MAJOR__ = __EXPERIMENTAL__;
|
|
export const enableRefAsProp = true;
|
|
export const disableStringRefs = true;
|
|
export const disableLegacyMode = true;
|
|
export const disableLegacyContext = true;
|
|
export const disableDOMTestUtils = true;
|
|
export const enableRenderableContext = true;
|
|
export const enableReactTestRendererWarning = true;
|
|
export const disableDefaultPropsExceptForClasses = true;
|
|
|
|
// Flow magic to verify the exports of this file match the original version.
|
|
((((null: any): ExportsType): FeatureFlagsType): ExportsType);
|