Skip to content

Commit 3c556fe

Browse files
committed
Enable "next major" feature flags
The canary channel now represents v19, so we can turn these flags on.
1 parent a550570 commit 3c556fe

File tree

2 files changed

+27
-22
lines changed

2 files changed

+27
-22
lines changed

packages/shared/ReactFeatureFlags.js

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,33 +130,38 @@ export const transitionLaneExpirationMs = 5000;
130130
//
131131
// Alias __NEXT_MAJOR__ to __EXPERIMENTAL__ for easier skimming.
132132
// -----------------------------------------------------------------------------
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__;
134139

135140
// Removes legacy style context
136-
export const disableLegacyContext = __NEXT_MAJOR__;
141+
export const disableLegacyContext = true;
137142

138143
// Not ready to break experimental yet.
139144
// Modern <StrictMode /> behaviour aligns more with what components
140145
// components will encounter in production, especially when used With <Offscreen />.
141146
// TODO: clean up legacy <StrictMode /> once tests pass WWW.
142-
export const useModernStrictMode = __NEXT_MAJOR__;
147+
export const useModernStrictMode = true;
143148

144149
// Not ready to break experimental yet.
145150
// Remove IE and MsApp specific workarounds for innerHTML
146-
export const disableIEWorkarounds = __NEXT_MAJOR__;
151+
export const disableIEWorkarounds = true;
147152

148153
// Filter certain DOM attributes (e.g. src, href) if their values are empty
149154
// strings. This prevents e.g. <img src=""> from making an unnecessary HTTP
150155
// request for certain browsers.
151-
export const enableFilterEmptyStringAttributesDOM = __NEXT_MAJOR__;
156+
export const enableFilterEmptyStringAttributesDOM = true;
152157

153158
// Disabled caching behavior of `react/cache` in client runtimes.
154159
export const disableClientCache = false;
155160

156161
// Changes Server Components Reconciliation when they have keys
157-
export const enableServerComponentKeys = __NEXT_MAJOR__;
162+
export const enableServerComponentKeys = true;
158163

159-
export const enableBigIntSupport = __NEXT_MAJOR__;
164+
export const enableBigIntSupport = true;
160165

161166
/**
162167
* Enables a new error detection for infinite render loops from updates caused
@@ -169,21 +174,21 @@ export const enableInfiniteRenderLoopDetection = true;
169174

170175
// Passes `ref` as a normal prop instead of stripping it from the props object
171176
// 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;
174179

175180
// Warn on any usage of ReactTestRenderer
176-
export const enableReactTestRendererWarning = __NEXT_MAJOR__;
181+
export const enableReactTestRendererWarning = true;
177182

178183
// Disables legacy mode
179184
// This allows us to land breaking changes to remove legacy mode APIs in experimental builds
180185
// before removing them in stable in the next Major
181-
export const disableLegacyMode = __NEXT_MAJOR__;
186+
export const disableLegacyMode = true;
182187

183-
export const disableDOMTestUtils = __NEXT_MAJOR__;
188+
export const disableDOMTestUtils = true;
184189

185190
// Make <Context> equivalent to <Context.Provider> instead of <Context.Consumer>
186-
export const enableRenderableContext = __NEXT_MAJOR__;
191+
export const enableRenderableContext = true;
187192

188193
// -----------------------------------------------------------------------------
189194
// Chopping Block

packages/shared/forks/ReactFeatureFlags.test-renderer.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ export const enableInfiniteRenderLoopDetection = false;
8484
//
8585
// We really need to get rid of this whole module. Any test renderer specific
8686
// 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__;
91-
export const disableLegacyMode = __NEXT_MAJOR__;
92-
export const disableLegacyContext = __NEXT_MAJOR__;
93-
export const disableDOMTestUtils = __NEXT_MAJOR__;
94-
export const enableRenderableContext = __NEXT_MAJOR__;
95-
export const enableReactTestRendererWarning = __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 = true;
93+
export const disableDOMTestUtils = true;
94+
export const enableRenderableContext = true;
95+
export const enableReactTestRendererWarning = true;
9696

9797
// Flow magic to verify the exports of this file match the original version.
9898
((((null: any): ExportsType): FeatureFlagsType): ExportsType);

0 commit comments

Comments
 (0)