Skip to content

Commit 4a0aa11

Browse files
rickhanloniiAndyPengc12
authored andcommitted
Clean up experimental flags (facebook#28116)
## Overview Adds a new global to disambiguate experimental flags that we intend to land when we can make breaking changes.
1 parent fb85797 commit 4a0aa11

File tree

1 file changed

+35
-23
lines changed

1 file changed

+35
-23
lines changed

packages/shared/ReactFeatureFlags.js

+35-23
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,41 @@ export const retryLaneExpirationMs = 5000;
129129
export const syncLaneExpirationMs = 250;
130130
export const transitionLaneExpirationMs = 5000;
131131

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+
132167
// -----------------------------------------------------------------------------
133168
// Chopping Block
134169
//
@@ -145,8 +180,6 @@ export const createRootStrictEffectsByDefault = false;
145180

146181
export const disableModulePatternComponents = false;
147182

148-
export const disableLegacyContext = false;
149-
150183
export const enableUseRefAccessWarning = false;
151184

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

171-
// Disable javascript: URL strings in href for XSS protection.
172-
export const disableJavaScriptURLs = false;
173-
174204
export const enableTrustedTypesIntegration = false;
175205

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

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-
194210
// Disables children for <textarea> elements
195211
export const disableTextareaChildren = false;
196212

@@ -240,8 +256,4 @@ export const enableProfilerNestedUpdateScheduledHook = false;
240256

241257
export const consoleManagedByDevToolsDuringStrictMode = true;
242258

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;
247259
export const enableDO_NOT_USE_disableStrictPassiveEffect = false;

0 commit comments

Comments
 (0)