diff --git a/packages/react-dom/index.js b/packages/react-dom/index.js index 30ccf0a2eac89..4357044d90818 100644 --- a/packages/react-dom/index.js +++ b/packages/react-dom/index.js @@ -15,11 +15,8 @@ export { createRoot, hydrateRoot, flushSync, - render, - unmountComponentAtNode, unstable_batchedUpdates, unstable_createEventHandle, - unstable_renderSubtreeIntoContainer, unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority. useFormStatus, useFormState, diff --git a/packages/react-dom/index.stable.js b/packages/react-dom/index.stable.js index a817a6b3d9af3..3d5c05cf30ab8 100644 --- a/packages/react-dom/index.stable.js +++ b/packages/react-dom/index.stable.js @@ -13,8 +13,6 @@ export { createRoot, hydrateRoot, flushSync, - render, - unmountComponentAtNode, unstable_batchedUpdates, unstable_renderSubtreeIntoContainer, useFormStatus, diff --git a/packages/react-dom/src/__tests__/ReactTestUtils-test.js b/packages/react-dom/src/__tests__/ReactTestUtils-test.js index e3ed7c71a6883..80871a12d8e52 100644 --- a/packages/react-dom/src/__tests__/ReactTestUtils-test.js +++ b/packages/react-dom/src/__tests__/ReactTestUtils-test.js @@ -586,6 +586,7 @@ describe('ReactTestUtils', () => { }); // @gate !disableDOMTestUtils + // @gate !disableLegacyMode it('should call setState callback with no arguments', async () => { let mockArgs; class Component extends React.Component { diff --git a/packages/shared/ReactFeatureFlags.js b/packages/shared/ReactFeatureFlags.js index 4d4fc361f4879..c2d2d3095b3d1 100644 --- a/packages/shared/ReactFeatureFlags.js +++ b/packages/shared/ReactFeatureFlags.js @@ -179,7 +179,7 @@ export const enableReactTestRendererWarning = __NEXT_MAJOR__; // Disables legacy mode // This allows us to land breaking changes to remove legacy mode APIs in experimental builds // before removing them in stable in the next Major -export const disableLegacyMode = __NEXT_MAJOR__; +export const disableLegacyMode = true; export const disableDOMTestUtils = __NEXT_MAJOR__; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.js index df84dd4d4cc60..78000e1f7f77d 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.js @@ -89,7 +89,7 @@ const __NEXT_MAJOR__ = __EXPERIMENTAL__; export const enableRefAsProp = __NEXT_MAJOR__; export const disableStringRefs = __NEXT_MAJOR__; export const enableBigIntSupport = __NEXT_MAJOR__; -export const disableLegacyMode = __NEXT_MAJOR__; +export const disableLegacyMode = true; export const disableLegacyContext = __NEXT_MAJOR__; export const disableDOMTestUtils = __NEXT_MAJOR__; export const enableRenderableContext = __NEXT_MAJOR__;