Enable feature flags for v19 (#28647)
The canary channel now represents v19, so we can turn these flags on.
Andrew Clark committed
Apr 2, 2024 at 23:33 UTC
131f020c098c2ffeca1283e281c083f6fc99f1e3
2 files changed
+25
-20
packages/shared/ReactFeatureFlags.js
+17
-12
@@ -130,33 +130,38 @@ export const transitionLaneExpirationMs = 5000;
130
//
131
// Alias __NEXT_MAJOR__ to __EXPERIMENTAL__ for easier skimming.
132
// -----------------------------------------------------------------------------
133
-const __NEXT_MAJOR__ = __EXPERIMENTAL__;
133
+
134
+// TODO: Anything that's set to `true` in this section should either be cleaned
135
+// up (if it's on everywhere, including Meta and RN builds) or moved to a
136
+// different section of this file.
137
+
138
+// const __NEXT_MAJOR__ = __EXPERIMENTAL__;
139
140
// Removes legacy style context
136
-export const disableLegacyContext = __NEXT_MAJOR__;
141
+export const disableLegacyContext = true;
142
143
// Not ready to break experimental yet.
144
// Modern <StrictMode /> behaviour aligns more with what components
145
// components will encounter in production, especially when used With <Offscreen />.
146
// TODO: clean up legacy <StrictMode /> once tests pass WWW.
142
-export const useModernStrictMode = __NEXT_MAJOR__;
147
+export const useModernStrictMode = true;
148
149
// Not ready to break experimental yet.
150
// Remove IE and MsApp specific workarounds for innerHTML
146
-export const disableIEWorkarounds = __NEXT_MAJOR__;
151
+export const disableIEWorkarounds = true;
152
153
// Filter certain DOM attributes (e.g. src, href) if their values are empty
154
// strings. This prevents e.g. <img src=""> from making an unnecessary HTTP
155
// request for certain browsers.
151
-export const enableFilterEmptyStringAttributesDOM = __NEXT_MAJOR__;
156
+export const enableFilterEmptyStringAttributesDOM = true;
157
158
// Disabled caching behavior of `react/cache` in client runtimes.
159
export const disableClientCache = false;
160
161
// Changes Server Components Reconciliation when they have keys
157
-export const enableServerComponentKeys = __NEXT_MAJOR__;
162
+export const enableServerComponentKeys = true;
163
159
-export const enableBigIntSupport = __NEXT_MAJOR__;
164
+export const enableBigIntSupport = true;
165
166
/**
167
* Enables a new error detection for infinite render loops from updates caused
@@ -169,21 +174,21 @@ export const enableInfiniteRenderLoopDetection = true;
174
175
// Passes `ref` as a normal prop instead of stripping it from the props object
176
// during element creation.
172
-export const enableRefAsProp = __NEXT_MAJOR__;
173
-export const disableStringRefs = __NEXT_MAJOR__;
177
+export const enableRefAsProp = true;
178
+export const disableStringRefs = true;
179
180
// Warn on any usage of ReactTestRenderer
176
-export const enableReactTestRendererWarning = __NEXT_MAJOR__;
181
+export const enableReactTestRendererWarning = true;
182
183
// Disables legacy mode
184
// This allows us to land breaking changes to remove legacy mode APIs in experimental builds
185
// before removing them in stable in the next Major
186
export const disableLegacyMode = true;
187
183
-export const disableDOMTestUtils = __NEXT_MAJOR__;
188
+export const disableDOMTestUtils = true;
189
190
// Make <Context> equivalent to <Context.Provider> instead of <Context.Consumer>
186
-export const enableRenderableContext = __NEXT_MAJOR__;
191
+export const enableRenderableContext = true;
192
193
// -----------------------------------------------------------------------------
194
// Chopping Block
packages/shared/forks/ReactFeatureFlags.test-renderer.js
+8
-8
@@ -84,15 +84,15 @@ export const enableInfiniteRenderLoopDetection = false;
84
//
85
// We really need to get rid of this whole module. Any test renderer specific
86
// flags should be handled by the Fiber config.
87
-const __NEXT_MAJOR__ = __EXPERIMENTAL__;
88
-export const enableRefAsProp = __NEXT_MAJOR__;
89
-export const disableStringRefs = __NEXT_MAJOR__;
90
-export const enableBigIntSupport = __NEXT_MAJOR__;
87
+// const __NEXT_MAJOR__ = __EXPERIMENTAL__;
88
+export const enableRefAsProp = true;
89
+export const disableStringRefs = true;
90
+export const enableBigIntSupport = true;
91
export const disableLegacyMode = true;
92
-export const disableLegacyContext = __NEXT_MAJOR__;
93
-export const disableDOMTestUtils = __NEXT_MAJOR__;
94
-export const enableRenderableContext = __NEXT_MAJOR__;
95
-export const enableReactTestRendererWarning = __NEXT_MAJOR__;
92
+export const disableLegacyContext = true;
93
+export const disableDOMTestUtils = true;
94
+export const enableRenderableContext = true;
95
+export const enableReactTestRendererWarning = true;
96
97
// Flow magic to verify the exports of this file match the original version.
98
((((null: any): ExportsType): FeatureFlagsType): ExportsType);