mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
Object literals should be faster at least on React Native with Hermes as the JS engine. It might also be interesting to confirm the old comments in this file from years ago are even still valid. Creating an object from a literal should be a simpler operation. It's a bit unfortunate that this introduces a bunch of copied code, but since we rearely update the fields on fibers, this seems like an okay tradeoff for a hot code path. An alternative would be some sort of macro system, but that doesn't seem worth the extra complexity.
95 lines
4.1 KiB
JavaScript
95 lines
4.1 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.native-oss';
|
|
|
|
// TODO: Align these flags with canary and delete this file once RN ships from Canary.
|
|
|
|
// DEV-only but enabled in the next RN Major.
|
|
// Not supported by flag script to avoid the special case.
|
|
export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// All other flags
|
|
// -----------------------------------------------------------------------------
|
|
export const allowConcurrentByDefault = false;
|
|
export const alwaysThrottleRetries = false;
|
|
export const consoleManagedByDevToolsDuringStrictMode = true;
|
|
export const disableClientCache = true;
|
|
export const disableCommentsAsDOMContainers = true;
|
|
export const disableDefaultPropsExceptForClasses = true;
|
|
export const disableIEWorkarounds = true;
|
|
export const disableInputAttributeSyncing = false;
|
|
export const disableLegacyContext = true;
|
|
export const disableLegacyMode = false;
|
|
export const disableSchedulerTimeoutInWorkLoop = false;
|
|
export const disableStringRefs = true;
|
|
export const disableTextareaChildren = false;
|
|
export const enableAddPropertiesFastPath = false;
|
|
export const enableAsyncActions = true;
|
|
export const enableAsyncDebugInfo = false;
|
|
export const enableAsyncIterableChildren = false;
|
|
export const enableBinaryFlight = true;
|
|
export const enableCache = true;
|
|
export const enableComponentStackLocations = true;
|
|
export const enableCPUSuspense = false;
|
|
export const enableCreateEventHandleAPI = false;
|
|
export const enableDebugTracing = false;
|
|
export const enableDeferRootSchedulingToMicrotask = true;
|
|
export const enableDO_NOT_USE_disableStrictPassiveEffect = false;
|
|
export const enableFastJSX = true;
|
|
export const enableFilterEmptyStringAttributesDOM = true;
|
|
export const enableFizzExternalRuntime = true;
|
|
export const enableFlightReadableStream = true;
|
|
export const enableGetInspectorDataForInstanceInProduction = false;
|
|
export const enableInfiniteRenderLoopDetection = true;
|
|
export const enableLazyContextPropagation = false;
|
|
export const enableLegacyCache = false;
|
|
export const enableLegacyFBSupport = false;
|
|
export const enableLegacyHidden = false;
|
|
export const enableNoCloningMemoCache = false;
|
|
export const enableObjectFiber = false;
|
|
export const enableOwnerStacks = __EXPERIMENTAL__;
|
|
export const enablePostpone = false;
|
|
export const enableReactTestRendererWarning = false;
|
|
export const enableRefAsProp = true;
|
|
export const enableRenderableContext = true;
|
|
export const enableRetryLaneExpiration = false;
|
|
export const enableSchedulingProfiler = __PROFILE__;
|
|
export const enableScopeAPI = false;
|
|
export const enableServerComponentLogs = true;
|
|
export const enableShallowPropDiffing = false;
|
|
export const enableSuspenseAvoidThisFallback = false;
|
|
export const enableSuspenseAvoidThisFallbackFizz = false;
|
|
export const enableSuspenseCallback = false;
|
|
export const enableTaint = true;
|
|
export const enableTransitionTracing = false;
|
|
export const enableTrustedTypesIntegration = false;
|
|
export const enableUseDeferredValueInitialArg = true;
|
|
export const enableUseEffectEventHook = false;
|
|
export const enableUseMemoCacheHook = true;
|
|
export const favorSafetyOverHydrationPerf = true;
|
|
export const forceConcurrentByDefaultForTesting = false;
|
|
export const passChildrenWhenCloningPersistedNodes = false;
|
|
export const renameElementSymbol = true;
|
|
export const retryLaneExpirationMs = 5000;
|
|
export const syncLaneExpirationMs = 250;
|
|
export const transitionLaneExpirationMs = 5000;
|
|
export const useModernStrictMode = true;
|
|
|
|
// Profiling Only
|
|
export const enableProfilerTimer = __PROFILE__;
|
|
export const enableProfilerCommitHooks = __PROFILE__;
|
|
export const enableProfilerNestedUpdatePhase = __PROFILE__;
|
|
export const enableUpdaterTracking = __PROFILE__;
|
|
|
|
// Flow magic to verify the exports of this file match the original version.
|
|
((((null: any): ExportsType): FeatureFlagsType): ExportsType);
|