|
10 | 10 | import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags';
|
11 | 11 | import typeof * as ExportsType from './ReactFeatureFlags.native-oss';
|
12 | 12 |
|
| 13 | +// TODO: Align these flags with canary and delete this file once RN ships from Canary. |
| 14 | + |
13 | 15 | // -----------------------------------------------------------------------------
|
14 |
| -// Ready for next major. |
| 16 | +// TODO for next React Native major. |
15 | 17 | //
|
16 |
| -// Alias __NEXT_MAJOR__ to false for easier skimming. |
| 18 | +// Alias __TODO_NEXT_RN_MAJOR__ to false for easier skimming. |
17 | 19 | // -----------------------------------------------------------------------------
|
18 |
| -const __NEXT_MAJOR__ = false; |
| 20 | +const __TODO_NEXT_RN_MAJOR__ = false; |
| 21 | +export const enableRefAsProp = __TODO_NEXT_RN_MAJOR__; |
| 22 | +export const disableStringRefs = __TODO_NEXT_RN_MAJOR__; |
| 23 | +export const disableLegacyMode = __TODO_NEXT_RN_MAJOR__; |
| 24 | +export const enableBigIntSupport = __TODO_NEXT_RN_MAJOR__; |
| 25 | +export const useModernStrictMode = __TODO_NEXT_RN_MAJOR__; |
| 26 | +export const enableReactTestRendererWarning = __TODO_NEXT_RN_MAJOR__; |
| 27 | +export const enableAsyncActions = __TODO_NEXT_RN_MAJOR__; |
| 28 | +export const consoleManagedByDevToolsDuringStrictMode = __TODO_NEXT_RN_MAJOR__; |
| 29 | +export const enableDeferRootSchedulingToMicrotask = __TODO_NEXT_RN_MAJOR__; |
| 30 | +export const alwaysThrottleDisappearingFallbacks = __TODO_NEXT_RN_MAJOR__; |
| 31 | +export const alwaysThrottleRetries = __TODO_NEXT_RN_MAJOR__; |
| 32 | +export const enableInfiniteRenderLoopDetection = __TODO_NEXT_RN_MAJOR__; |
| 33 | +export const enableComponentStackLocations = __TODO_NEXT_RN_MAJOR__; |
| 34 | +export const disableModulePatternComponents = __TODO_NEXT_RN_MAJOR__; |
19 | 35 |
|
| 36 | +// ----------------------------------------------------------------------------- |
| 37 | +// These are ready to flip after the next React npm release (or RN switches to |
| 38 | +// Canary, but can't flip before then because of react/renderer mismatches. |
| 39 | +// ----------------------------------------------------------------------------- |
| 40 | +export const enableCache = __TODO_NEXT_RN_MAJOR__; |
| 41 | +export const enableRenderableContext = __TODO_NEXT_RN_MAJOR__; |
| 42 | + |
| 43 | +// ----------------------------------------------------------------------------- |
| 44 | +// Already enabled for next React Native major. |
| 45 | +// Hardcode these to true after the next RN major. |
| 46 | +// |
| 47 | +// Alias __NEXT_RN_MAJOR__ to true for easier skimming. |
| 48 | +// ----------------------------------------------------------------------------- |
| 49 | +const __NEXT_RN_MAJOR__ = true; |
| 50 | +export const disableClientCache = __NEXT_RN_MAJOR__; |
| 51 | +export const disableLegacyContext = __NEXT_RN_MAJOR__; |
| 52 | +export const enableCacheElement = __NEXT_RN_MAJOR__; |
| 53 | +export const enableTaint = __NEXT_RN_MAJOR__; |
| 54 | +export const enableUnifiedSyncLane = __NEXT_RN_MAJOR__; |
| 55 | +export const enableFizzExternalRuntime = __NEXT_RN_MAJOR__; // DOM-only |
| 56 | +export const disableJavaScriptURLs = __NEXT_RN_MAJOR__; // DOM-only |
| 57 | +export const enableFormActions = __NEXT_RN_MAJOR__; // DOM-only |
| 58 | +export const enableBinaryFlight = __NEXT_RN_MAJOR__; // DOM-only |
| 59 | +export const enableCustomElementPropertySupport = __NEXT_RN_MAJOR__; // DOM-only |
| 60 | +export const enableServerComponentKeys = __NEXT_RN_MAJOR__; |
| 61 | +export const enableServerComponentLogs = __NEXT_RN_MAJOR__; |
| 62 | + |
| 63 | +// DEV-only but enabled in the next RN Major. |
| 64 | +// Not supported by flag script to avoid the special case. |
20 | 65 | export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
|
| 66 | + |
| 67 | +// TODO: decide on React 19 |
| 68 | +export const enableUseMemoCacheHook = false; |
| 69 | +export const enableUseDeferredValueInitialArg = __EXPERIMENTAL__; |
| 70 | + |
| 71 | +// ----------------------------------------------------------------------------- |
| 72 | +// All other flags |
| 73 | +// ----------------------------------------------------------------------------- |
| 74 | +export const enableCPUSuspense = false; |
21 | 75 | export const enableDebugTracing = false;
|
22 | 76 | export const enableAsyncDebugInfo = false;
|
23 | 77 | export const enableSchedulingProfiler = false;
|
24 |
| -export const enableProfilerTimer = __PROFILE__; |
25 |
| -export const enableProfilerCommitHooks = __PROFILE__; |
26 |
| -export const enableProfilerNestedUpdatePhase = __PROFILE__; |
27 |
| -export const enableUpdaterTracking = __PROFILE__; |
28 |
| -export const enableCache = __NEXT_MAJOR__; |
29 | 78 | export const enableLegacyCache = false;
|
30 |
| -export const enableCacheElement = true; |
31 | 79 | export const enableFetchInstrumentation = false;
|
32 |
| -export const enableFormActions = true; // Doesn't affect Native |
33 |
| -export const enableBinaryFlight = true; |
34 |
| -export const enableTaint = true; |
35 | 80 | export const enablePostpone = false;
|
36 |
| -export const disableJavaScriptURLs = true; |
37 | 81 | export const disableCommentsAsDOMContainers = true;
|
38 | 82 | export const disableInputAttributeSyncing = false;
|
39 | 83 | export const disableIEWorkarounds = true;
|
40 | 84 | export const enableScopeAPI = false;
|
41 | 85 | export const enableCreateEventHandleAPI = false;
|
42 | 86 | export const enableSuspenseCallback = false;
|
43 |
| -export const disableLegacyContext = true; |
44 | 87 | export const enableTrustedTypesIntegration = false;
|
45 | 88 | export const disableTextareaChildren = false;
|
46 |
| -export const disableModulePatternComponents = false; |
47 | 89 | export const enableSuspenseAvoidThisFallback = false;
|
48 | 90 | export const enableSuspenseAvoidThisFallbackFizz = false;
|
49 |
| -export const enableCPUSuspense = false; |
50 |
| -export const enableUseMemoCacheHook = false; |
51 | 91 | export const enableUseEffectEventHook = false;
|
52 | 92 | export const enableClientRenderFallbackOnTextMismatch = true;
|
53 |
| -export const enableComponentStackLocations = false; |
54 | 93 | export const enableLegacyFBSupport = false;
|
55 | 94 | export const enableFilterEmptyStringAttributesDOM = true;
|
56 | 95 | export const enableGetInspectorDataForInstanceInProduction = false;
|
57 |
| -export const enableRenderableContext = false; |
58 |
| - |
59 | 96 | export const enableRetryLaneExpiration = false;
|
60 | 97 | export const retryLaneExpirationMs = 5000;
|
61 | 98 | export const syncLaneExpirationMs = 250;
|
62 | 99 | export const transitionLaneExpirationMs = 5000;
|
63 |
| - |
64 | 100 | export const enableUseRefAccessWarning = false;
|
65 |
| - |
66 | 101 | export const disableSchedulerTimeoutInWorkLoop = false;
|
67 | 102 | export const enableLazyContextPropagation = false;
|
68 | 103 | export const enableLegacyHidden = false;
|
69 | 104 | export const forceConcurrentByDefaultForTesting = false;
|
70 |
| -export const enableUnifiedSyncLane = true; |
71 | 105 | export const allowConcurrentByDefault = false;
|
72 |
| -export const enableCustomElementPropertySupport = true; |
73 | 106 | export const enableNewBooleanProps = true;
|
74 |
| - |
75 |
| -export const consoleManagedByDevToolsDuringStrictMode = false; |
76 |
| - |
77 | 107 | export const enableTransitionTracing = false;
|
78 |
| - |
79 |
| -export const useModernStrictMode = false; |
80 | 108 | export const enableDO_NOT_USE_disableStrictPassiveEffect = false;
|
81 |
| -export const enableFizzExternalRuntime = true; |
82 |
| -export const enableDeferRootSchedulingToMicrotask = false; |
83 |
| -export const enableInfiniteRenderLoopDetection = false; |
84 |
| - |
85 |
| -export const enableAsyncActions = false; |
86 |
| - |
87 |
| -export const alwaysThrottleDisappearingFallbacks = false; |
88 |
| -export const alwaysThrottleRetries = false; |
89 |
| - |
90 | 109 | export const passChildrenWhenCloningPersistedNodes = false;
|
91 |
| -export const enableUseDeferredValueInitialArg = __EXPERIMENTAL__; |
92 |
| -export const disableClientCache = true; |
93 |
| - |
94 |
| -export const enableServerComponentKeys = true; |
95 |
| -export const enableServerComponentLogs = true; |
96 |
| - |
97 |
| -// TODO: Should turn this on in next "major" RN release. |
98 |
| -export const enableRefAsProp = false; |
99 |
| -export const disableStringRefs = false; |
100 |
| - |
101 |
| -export const enableReactTestRendererWarning = false; |
102 | 110 |
|
103 |
| -export const enableBigIntSupport = false; |
104 |
| -export const disableLegacyMode = false; |
| 111 | +// Profiling Only |
| 112 | +export const enableProfilerTimer = __PROFILE__; |
| 113 | +export const enableProfilerCommitHooks = __PROFILE__; |
| 114 | +export const enableProfilerNestedUpdatePhase = __PROFILE__; |
| 115 | +export const enableUpdaterTracking = __PROFILE__; |
105 | 116 |
|
106 | 117 | // Flow magic to verify the exports of this file match the original version.
|
107 | 118 | ((((null: any): ExportsType): FeatureFlagsType): ExportsType);
|
0 commit comments