Skip to content

Commit 2eeca93

Browse files
rickhanloniigaearon
authored andcommitted
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.
1 parent fe9adce commit 2eeca93

File tree

1 file changed

+35
-23
lines changed

1 file changed

+35
-23
lines changed

packages/shared/ReactFeatureFlags.js

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,41 @@ export const retryLaneExpirationMs = 5000;
131131
export const syncLaneExpirationMs = 250;
132132
export const transitionLaneExpirationMs = 5000;
133133

134+
// -----------------------------------------------------------------------------
135+
// Ready for next major.
136+
//
137+
// Alias __NEXT_MAJOR__ to __EXPERIMENTAL__ for easier skimming.
138+
// -----------------------------------------------------------------------------
139+
const __NEXT_MAJOR__ = __EXPERIMENTAL__;
140+
141+
// Not ready to break experimental yet.
142+
export const disableLegacyContext = false;
143+
144+
// Not ready to break experimental yet.
145+
// Disable javascript: URL strings in href for XSS protection.
146+
export const disableJavaScriptURLs = false;
147+
148+
// Not ready to break experimental yet.
149+
// Modern <StrictMode /> behaviour aligns more with what components
150+
// components will encounter in production, especially when used With <Offscreen />.
151+
// TODO: clean up legacy <StrictMode /> once tests pass WWW.
152+
export const useModernStrictMode = false;
153+
154+
// Not ready to break experimental yet.
155+
// Remove IE and MsApp specific workarounds for innerHTML
156+
export const disableIEWorkarounds = __NEXT_MAJOR__;
157+
158+
// Changes the behavior for rendering custom elements in both server rendering
159+
// and client rendering, mostly to allow JSX attributes to apply to the custom
160+
// element's object properties instead of only HTML attributes.
161+
// https://github.com/facebook/react/issues/11347
162+
export const enableCustomElementPropertySupport = __NEXT_MAJOR__;
163+
164+
// Filter certain DOM attributes (e.g. src, href) if their values are empty
165+
// strings. This prevents e.g. <img src=""> from making an unnecessary HTTP
166+
// request for certain browsers.
167+
export const enableFilterEmptyStringAttributesDOM = __NEXT_MAJOR__;
168+
134169
// -----------------------------------------------------------------------------
135170
// Chopping Block
136171
//
@@ -147,8 +182,6 @@ export const createRootStrictEffectsByDefault = false;
147182

148183
export const disableModulePatternComponents = false;
149184

150-
export const disableLegacyContext = false;
151-
152185
export const enableUseRefAccessWarning = false;
153186

154187
// Enables time slicing for updates that aren't wrapped in startTransition.
@@ -170,29 +203,12 @@ export const allowConcurrentByDefault = false;
170203
// in open source, but www codebase still relies on it. Need to remove.
171204
export const disableCommentsAsDOMContainers = true;
172205

173-
// Disable javascript: URL strings in href for XSS protection.
174-
export const disableJavaScriptURLs = false;
175-
176206
export const enableTrustedTypesIntegration = false;
177207

178208
// Prevent the value and checked attributes from syncing with their related
179209
// DOM properties
180210
export const disableInputAttributeSyncing = false;
181211

182-
// Remove IE and MsApp specific workarounds for innerHTML
183-
export const disableIEWorkarounds = __EXPERIMENTAL__;
184-
185-
// Filter certain DOM attributes (e.g. src, href) if their values are empty
186-
// strings. This prevents e.g. <img src=""> from making an unnecessary HTTP
187-
// request for certain browsers.
188-
export const enableFilterEmptyStringAttributesDOM = __EXPERIMENTAL__;
189-
190-
// Changes the behavior for rendering custom elements in both server rendering
191-
// and client rendering, mostly to allow JSX attributes to apply to the custom
192-
// element's object properties instead of only HTML attributes.
193-
// https://github.com/facebook/react/issues/11347
194-
export const enableCustomElementPropertySupport = __EXPERIMENTAL__;
195-
196212
// Disables children for <textarea> elements
197213
export const disableTextareaChildren = false;
198214

@@ -242,8 +258,4 @@ export const enableProfilerNestedUpdateScheduledHook = false;
242258

243259
export const consoleManagedByDevToolsDuringStrictMode = true;
244260

245-
// Modern <StrictMode /> behaviour aligns more with what components
246-
// components will encounter in production, especially when used With <Offscreen />.
247-
// TODO: clean up legacy <StrictMode /> once tests pass WWW.
248-
export const useModernStrictMode = false;
249261
export const enableDO_NOT_USE_disableStrictPassiveEffect = false;

0 commit comments

Comments
 (0)