Clean up experimental flags (#28116)
## Overview Adds a new global to disambiguate experimental flags that we intend to land when we can make breaking changes.
Ricky committed
Jan 29, 2024 at 14:03 UTC
4d6c47baa3bf40bb7dea23642dd42e97eba4232d
1 file changed
+35
-23
packages/shared/ReactFeatureFlags.js
+35
-23
@@ -129,6 +129,41 @@ export const retryLaneExpirationMs = 5000;
129
export const syncLaneExpirationMs = 250;
130
export const transitionLaneExpirationMs = 5000;
131
132
+// -----------------------------------------------------------------------------
133
+// Ready for next major.
134
+//
135
+// Alias __NEXT_MAJOR__ to __EXPERIMENTAL__ for easier skimming.
136
+// -----------------------------------------------------------------------------
137
+const __NEXT_MAJOR__ = __EXPERIMENTAL__;
138
+
139
+// Not ready to break experimental yet.
140
+export const disableLegacyContext = false;
141
+
142
+// Not ready to break experimental yet.
143
+// Disable javascript: URL strings in href for XSS protection.
144
+export const disableJavaScriptURLs = false;
145
+
146
+// Not ready to break experimental yet.
147
+// Modern <StrictMode /> behaviour aligns more with what components
148
+// components will encounter in production, especially when used With <Offscreen />.
149
+// TODO: clean up legacy <StrictMode /> once tests pass WWW.
150
+export const useModernStrictMode = false;
151
+
152
+// Not ready to break experimental yet.
153
+// Remove IE and MsApp specific workarounds for innerHTML
154
+export const disableIEWorkarounds = __NEXT_MAJOR__;
155
+
156
+// Changes the behavior for rendering custom elements in both server rendering
157
+// and client rendering, mostly to allow JSX attributes to apply to the custom
158
+// element's object properties instead of only HTML attributes.
159
+// https://github.com/facebook/react/issues/11347
160
+export const enableCustomElementPropertySupport = __NEXT_MAJOR__;
161
+
162
+// Filter certain DOM attributes (e.g. src, href) if their values are empty
163
+// strings. This prevents e.g. <img src=""> from making an unnecessary HTTP
164
+// request for certain browsers.
165
+export const enableFilterEmptyStringAttributesDOM = __NEXT_MAJOR__;
166
+
167
// -----------------------------------------------------------------------------
168
// Chopping Block
169
//
@@ -145,8 +180,6 @@ export const createRootStrictEffectsByDefault = false;
180
181
export const disableModulePatternComponents = false;
182
148
-export const disableLegacyContext = false;
149
-
183
export const enableUseRefAccessWarning = false;
184
185
// Enables time slicing for updates that aren't wrapped in startTransition.
@@ -168,29 +201,12 @@ export const allowConcurrentByDefault = false;
201
// in open source, but www codebase still relies on it. Need to remove.
202
export const disableCommentsAsDOMContainers = true;
203
171
-// Disable javascript: URL strings in href for XSS protection.
172
-export const disableJavaScriptURLs = false;
173
-
204
export const enableTrustedTypesIntegration = false;
205
206
// Prevent the value and checked attributes from syncing with their related
207
// DOM properties
208
export const disableInputAttributeSyncing = false;
209
180
-// Remove IE and MsApp specific workarounds for innerHTML
181
-export const disableIEWorkarounds = __EXPERIMENTAL__;
182
-
183
-// Filter certain DOM attributes (e.g. src, href) if their values are empty
184
-// strings. This prevents e.g. <img src=""> from making an unnecessary HTTP
185
-// request for certain browsers.
186
-export const enableFilterEmptyStringAttributesDOM = __EXPERIMENTAL__;
187
-
188
-// Changes the behavior for rendering custom elements in both server rendering
189
-// and client rendering, mostly to allow JSX attributes to apply to the custom
190
-// element's object properties instead of only HTML attributes.
191
-// https://github.com/facebook/react/issues/11347
192
-export const enableCustomElementPropertySupport = __EXPERIMENTAL__;
193
-
210
// Disables children for <textarea> elements
211
export const disableTextareaChildren = false;
212
@@ -240,8 +256,4 @@ export const enableProfilerNestedUpdateScheduledHook = false;
256
257
export const consoleManagedByDevToolsDuringStrictMode = true;
258
243
-// Modern <StrictMode /> behaviour aligns more with what components
244
-// components will encounter in production, especially when used With <Offscreen />.
245
-// TODO: clean up legacy <StrictMode /> once tests pass WWW.
246
-export const useModernStrictMode = false;
259
export const enableDO_NOT_USE_disableStrictPassiveEffect = false;