diff --git a/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js b/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js
index fcd84fedfed71..ff8e7e1ac8683 100644
--- a/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js
+++ b/packages/react-debug-tools/src/__tests__/ReactHooksInspectionIntegration-test.js
@@ -1573,7 +1573,6 @@ describe('ReactHooksInspectionIntegration', () => {
});
describe('useMemoCache', () => {
- // @gate enableUseMemoCacheHook
it('should not be inspectable', async () => {
function Foo() {
const $ = useMemoCache(1);
@@ -1601,7 +1600,6 @@ describe('ReactHooksInspectionIntegration', () => {
expect(tree.length).toEqual(0);
});
- // @gate enableUseMemoCacheHook
it('should work in combination with other hooks', async () => {
function useSomething() {
const [something] = React.useState(null);
diff --git a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
index fe2e713d8a3ba..04aaf0c2ac706 100644
--- a/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
+++ b/packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
@@ -3080,7 +3080,7 @@ function pushTitle(
console.error(
'React expects the `children` prop of
tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead.' +
' Browsers treat all child Nodes of tags as Text content and React expects to be able to convert `children` of tags to a single string value' +
- ' which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes.' +
+ ' which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes.' +
' For example: hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop' +
' is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.',
children.length,
@@ -3886,18 +3886,6 @@ const clientRenderedSuspenseBoundaryError1D =
const clientRenderedSuspenseBoundaryError2 =
stringToPrecomputedChunk('>');
-export function pushStartCompletedSuspenseBoundary(
- target: Array,
-) {
- target.push(startCompletedSuspenseBoundary);
-}
-
-export function pushEndCompletedSuspenseBoundary(
- target: Array,
-) {
- target.push(endSuspenseBoundary);
-}
-
export function writeStartCompletedSuspenseBoundary(
destination: Destination,
renderState: RenderState,
diff --git a/packages/react-dom-bindings/src/server/ReactFizzConfigDOMLegacy.js b/packages/react-dom-bindings/src/server/ReactFizzConfigDOMLegacy.js
index 725ee666f52af..e4cd9ca93d99e 100644
--- a/packages/react-dom-bindings/src/server/ReactFizzConfigDOMLegacy.js
+++ b/packages/react-dom-bindings/src/server/ReactFizzConfigDOMLegacy.js
@@ -142,8 +142,6 @@ export {
makeId,
pushStartInstance,
pushEndInstance,
- pushStartCompletedSuspenseBoundary,
- pushEndCompletedSuspenseBoundary,
pushFormStateMarkerIsMatching,
pushFormStateMarkerIsNotMatching,
writeStartSegment,
diff --git a/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js b/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
index 9c91be1225015..777f067a183e8 100644
--- a/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
@@ -2211,151 +2211,6 @@ describe('ReactDOMFizzServer', () => {
expect(getVisibleChildren(container)).toEqual(Hello
);
});
- // @gate enableSuspenseAvoidThisFallbackFizz
- it('should respect unstable_avoidThisFallback', async () => {
- const resolved = {
- 0: false,
- 1: false,
- };
- const promiseRes = {};
- const promises = {
- 0: new Promise(res => {
- promiseRes[0] = () => {
- resolved[0] = true;
- res();
- };
- }),
- 1: new Promise(res => {
- promiseRes[1] = () => {
- resolved[1] = true;
- res();
- };
- }),
- };
-
- const InnerComponent = ({isClient, depth}) => {
- if (isClient) {
- // Resuspend after re-rendering on client to check that fallback shows on client
- throw new Promise(() => {});
- }
- if (!resolved[depth]) {
- throw promises[depth];
- }
- return (
-
-
-
- );
- };
-
- function App({isClient}) {
- return (
-
-
-
-
-
- }
- unstable_avoidThisFallback={true}>
-
-
- }>
-
-
-
- }
- unstable_avoidThisFallback={true}>
-
-
-
-
-
-
- );
- }
-
- await jest.runAllTimers();
-
- await act(() => {
- const {pipe} = renderToPipeableStream();
- pipe(writable);
- });
-
- // Nothing is output since root has a suspense with avoidedThisFallback that hasn't resolved
- expect(getVisibleChildren(container)).toEqual(undefined);
- expect(container.innerHTML).not.toContain('Avoided Fallback');
-
- // resolve first suspense component with avoidThisFallback
- await act(() => {
- promiseRes[0]();
- });
-
- expect(getVisibleChildren(container)).toEqual(
-
- Non Suspense Content
-
resolved 0
-
Fallback
-
,
- );
-
- expect(container.innerHTML).not.toContain('Avoided Fallback2');
-
- await act(() => {
- promiseRes[1]();
- });
-
- expect(getVisibleChildren(container)).toEqual(
-
- Non Suspense Content
-
resolved 0
-
-
,
- );
-
- let root;
- await act(async () => {
- root = ReactDOMClient.hydrateRoot(container, );
- await waitForAll([]);
- await jest.runAllTimers();
- });
-
- // No change after hydration
- expect(getVisibleChildren(container)).toEqual(
-
- Non Suspense Content
-
resolved 0
-
-
,
- );
-
- await act(async () => {
- // Trigger update by changing isClient to true
- root.render();
- await waitForAll([]);
- await jest.runAllTimers();
- });
-
- // Now that we've resuspended at the root we show the root fallback
- expect(getVisibleChildren(container)).toEqual(
-
- Non Suspense Content
-
resolved 0
-
-
Avoided Fallback
-
,
- );
- });
-
it('calls getServerSnapshot instead of getSnapshot', async () => {
const ref = React.createRef();
@@ -5928,7 +5783,7 @@ describe('ReactDOMFizzServer', () => {
pipe(writable);
});
}).toErrorDev([
- 'React expects the `children` prop of tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length 2 instead. Browsers treat all child Nodes of tags as Text content and React expects to be able to convert `children` of tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be commong to combine text nodes and value nodes. For example: hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.',
+ 'React expects the `children` prop of tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length 2 instead. Browsers treat all child Nodes of tags as Text content and React expects to be able to convert `children` of tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: hello {nameOfUser}. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: {`hello ${nameOfUser}`}.',
]);
expect(getVisibleChildren(document.head)).toEqual();
diff --git a/packages/react-markup/src/ReactFizzConfigMarkup.js b/packages/react-markup/src/ReactFizzConfigMarkup.js
index 6b43d0bad39a7..048e54933930d 100644
--- a/packages/react-markup/src/ReactFizzConfigMarkup.js
+++ b/packages/react-markup/src/ReactFizzConfigMarkup.js
@@ -49,8 +49,6 @@ export {
getChildFormatContext,
makeId,
pushEndInstance,
- pushStartCompletedSuspenseBoundary,
- pushEndCompletedSuspenseBoundary,
pushFormStateMarkerIsMatching,
pushFormStateMarkerIsNotMatching,
writeStartSegment,
diff --git a/packages/react-reconciler/src/ReactFiberHooks.js b/packages/react-reconciler/src/ReactFiberHooks.js
index 033e71610f5c6..d2df61063f687 100644
--- a/packages/react-reconciler/src/ReactFiberHooks.js
+++ b/packages/react-reconciler/src/ReactFiberHooks.js
@@ -40,7 +40,6 @@ import {
enableCache,
enableLazyContextPropagation,
enableTransitionTracing,
- enableUseMemoCacheHook,
enableUseEffectEventHook,
enableLegacyCache,
debugRenderPhaseSideEffectsForStrictMode,
@@ -277,8 +276,7 @@ export type FunctionComponentUpdateQueue = {
lastEffect: Effect | null,
events: Array> | null,
stores: Array> | null,
- // NOTE: optional, only set when enableUseMemoCacheHook is enabled
- memoCache?: MemoCache | null,
+ memoCache: MemoCache | null,
};
type BasicStateAction = (S => S) | S;
@@ -1127,25 +1125,12 @@ function unstable_useContextWithBailout(
return readContextAndCompare(context, select);
}
-// NOTE: defining two versions of this function to avoid size impact when this feature is disabled.
-// Previously this function was inlined, the additional `memoCache` property makes it not inlined.
-let createFunctionComponentUpdateQueue: () => FunctionComponentUpdateQueue;
-if (enableUseMemoCacheHook) {
- createFunctionComponentUpdateQueue = () => {
- return {
- lastEffect: null,
- events: null,
- stores: null,
- memoCache: null,
- };
- };
-} else {
- createFunctionComponentUpdateQueue = () => {
- return {
- lastEffect: null,
- events: null,
- stores: null,
- };
+function createFunctionComponentUpdateQueue(): FunctionComponentUpdateQueue {
+ return {
+ lastEffect: null,
+ events: null,
+ stores: null,
+ memoCache: null,
};
}
@@ -1155,13 +1140,11 @@ function resetFunctionComponentUpdateQueue(
updateQueue.lastEffect = null;
updateQueue.events = null;
updateQueue.stores = null;
- if (enableUseMemoCacheHook) {
- if (updateQueue.memoCache != null) {
- // NOTE: this function intentionally does not reset memoCache data. We reuse updateQueue for the memo
- // cache to avoid increasing the size of fibers that don't need a cache, but we don't want to reset
- // the cache when other properties are reset.
- updateQueue.memoCache.index = 0;
- }
+ if (updateQueue.memoCache != null) {
+ // NOTE: this function intentionally does not reset memoCache data. We reuse updateQueue for the memo
+ // cache to avoid increasing the size of fibers that don't need a cache, but we don't want to reset
+ // the cache when other properties are reset.
+ updateQueue.memoCache.index = 0;
}
}
@@ -3982,13 +3965,11 @@ export const ContextOnlyDispatcher: Dispatcher = {
useFormState: throwInvalidHookError,
useActionState: throwInvalidHookError,
useOptimistic: throwInvalidHookError,
+ useMemoCache: throwInvalidHookError,
};
if (enableCache) {
(ContextOnlyDispatcher: Dispatcher).useCacheRefresh = throwInvalidHookError;
}
-if (enableUseMemoCacheHook) {
- (ContextOnlyDispatcher: Dispatcher).useMemoCache = throwInvalidHookError;
-}
if (enableUseEffectEventHook) {
(ContextOnlyDispatcher: Dispatcher).useEffectEvent = throwInvalidHookError;
}
@@ -4023,13 +4004,11 @@ const HooksDispatcherOnMount: Dispatcher = {
useFormState: mountActionState,
useActionState: mountActionState,
useOptimistic: mountOptimistic,
+ useMemoCache,
};
if (enableCache) {
(HooksDispatcherOnMount: Dispatcher).useCacheRefresh = mountRefresh;
}
-if (enableUseMemoCacheHook) {
- (HooksDispatcherOnMount: Dispatcher).useMemoCache = useMemoCache;
-}
if (enableUseEffectEventHook) {
(HooksDispatcherOnMount: Dispatcher).useEffectEvent = mountEvent;
}
@@ -4064,13 +4043,11 @@ const HooksDispatcherOnUpdate: Dispatcher = {
useFormState: updateActionState,
useActionState: updateActionState,
useOptimistic: updateOptimistic,
+ useMemoCache,
};
if (enableCache) {
(HooksDispatcherOnUpdate: Dispatcher).useCacheRefresh = updateRefresh;
}
-if (enableUseMemoCacheHook) {
- (HooksDispatcherOnUpdate: Dispatcher).useMemoCache = useMemoCache;
-}
if (enableUseEffectEventHook) {
(HooksDispatcherOnUpdate: Dispatcher).useEffectEvent = updateEvent;
}
@@ -4106,13 +4083,11 @@ const HooksDispatcherOnRerender: Dispatcher = {
useFormState: rerenderActionState,
useActionState: rerenderActionState,
useOptimistic: rerenderOptimistic,
+ useMemoCache,
};
if (enableCache) {
(HooksDispatcherOnRerender: Dispatcher).useCacheRefresh = updateRefresh;
}
-if (enableUseMemoCacheHook) {
- (HooksDispatcherOnRerender: Dispatcher).useMemoCache = useMemoCache;
-}
if (enableUseEffectEventHook) {
(HooksDispatcherOnRerender: Dispatcher).useEffectEvent = updateEvent;
}
@@ -4307,6 +4282,7 @@ if (__DEV__) {
return mountOptimistic(passthrough, reducer);
},
useHostTransitionStatus,
+ useMemoCache,
};
if (enableCache) {
(HooksDispatcherOnMountInDEV: Dispatcher).useCacheRefresh =
@@ -4316,9 +4292,6 @@ if (__DEV__) {
return mountRefresh();
};
}
- if (enableUseMemoCacheHook) {
- (HooksDispatcherOnMountInDEV: Dispatcher).useMemoCache = useMemoCache;
- }
if (enableUseEffectEventHook) {
(HooksDispatcherOnMountInDEV: Dispatcher).useEffectEvent =
function useEffectEvent) => Return>(
@@ -4511,6 +4484,7 @@ if (__DEV__) {
return mountOptimistic(passthrough, reducer);
},
useHostTransitionStatus,
+ useMemoCache,
};
if (enableCache) {
(HooksDispatcherOnMountWithHookTypesInDEV: Dispatcher).useCacheRefresh =
@@ -4520,10 +4494,6 @@ if (__DEV__) {
return mountRefresh();
};
}
- if (enableUseMemoCacheHook) {
- (HooksDispatcherOnMountWithHookTypesInDEV: Dispatcher).useMemoCache =
- useMemoCache;
- }
if (enableUseEffectEventHook) {
(HooksDispatcherOnMountWithHookTypesInDEV: Dispatcher).useEffectEvent =
function useEffectEvent) => Return>(
@@ -4715,6 +4685,7 @@ if (__DEV__) {
return updateOptimistic(passthrough, reducer);
},
useHostTransitionStatus,
+ useMemoCache,
};
if (enableCache) {
(HooksDispatcherOnUpdateInDEV: Dispatcher).useCacheRefresh =
@@ -4724,9 +4695,6 @@ if (__DEV__) {
return updateRefresh();
};
}
- if (enableUseMemoCacheHook) {
- (HooksDispatcherOnUpdateInDEV: Dispatcher).useMemoCache = useMemoCache;
- }
if (enableUseEffectEventHook) {
(HooksDispatcherOnUpdateInDEV: Dispatcher).useEffectEvent =
function useEffectEvent) => Return>(
@@ -4918,6 +4886,7 @@ if (__DEV__) {
return rerenderOptimistic(passthrough, reducer);
},
useHostTransitionStatus,
+ useMemoCache,
};
if (enableCache) {
(HooksDispatcherOnRerenderInDEV: Dispatcher).useCacheRefresh =
@@ -4927,9 +4896,6 @@ if (__DEV__) {
return updateRefresh();
};
}
- if (enableUseMemoCacheHook) {
- (HooksDispatcherOnRerenderInDEV: Dispatcher).useMemoCache = useMemoCache;
- }
if (enableUseEffectEventHook) {
(HooksDispatcherOnRerenderInDEV: Dispatcher).useEffectEvent =
function useEffectEvent) => Return>(
@@ -5141,6 +5107,10 @@ if (__DEV__) {
mountHookTypesDev();
return mountOptimistic(passthrough, reducer);
},
+ useMemoCache(size: number): Array {
+ warnInvalidHookAccess();
+ return useMemoCache(size);
+ },
useHostTransitionStatus,
};
if (enableCache) {
@@ -5151,13 +5121,6 @@ if (__DEV__) {
return mountRefresh();
};
}
- if (enableUseMemoCacheHook) {
- (InvalidNestedHooksDispatcherOnMountInDEV: Dispatcher).useMemoCache =
- function (size: number): Array {
- warnInvalidHookAccess();
- return useMemoCache(size);
- };
- }
if (enableUseEffectEventHook) {
(InvalidNestedHooksDispatcherOnMountInDEV: Dispatcher).useEffectEvent =
function useEffectEvent) => Return>(
@@ -5372,6 +5335,10 @@ if (__DEV__) {
updateHookTypesDev();
return updateOptimistic(passthrough, reducer);
},
+ useMemoCache(size: number): Array {
+ warnInvalidHookAccess();
+ return useMemoCache(size);
+ },
useHostTransitionStatus,
};
if (enableCache) {
@@ -5382,13 +5349,6 @@ if (__DEV__) {
return updateRefresh();
};
}
- if (enableUseMemoCacheHook) {
- (InvalidNestedHooksDispatcherOnUpdateInDEV: Dispatcher).useMemoCache =
- function (size: number): Array {
- warnInvalidHookAccess();
- return useMemoCache(size);
- };
- }
if (enableUseEffectEventHook) {
(InvalidNestedHooksDispatcherOnUpdateInDEV: Dispatcher).useEffectEvent =
function useEffectEvent) => Return>(
@@ -5603,6 +5563,10 @@ if (__DEV__) {
updateHookTypesDev();
return rerenderOptimistic(passthrough, reducer);
},
+ useMemoCache(size: number): Array {
+ warnInvalidHookAccess();
+ return useMemoCache(size);
+ },
useHostTransitionStatus,
};
if (enableCache) {
@@ -5613,13 +5577,6 @@ if (__DEV__) {
return updateRefresh();
};
}
- if (enableUseMemoCacheHook) {
- (InvalidNestedHooksDispatcherOnRerenderInDEV: Dispatcher).useMemoCache =
- function (size: number): Array {
- warnInvalidHookAccess();
- return useMemoCache(size);
- };
- }
if (enableUseEffectEventHook) {
(InvalidNestedHooksDispatcherOnRerenderInDEV: Dispatcher).useEffectEvent =
function useEffectEvent) => Return>(
diff --git a/packages/react-reconciler/src/__tests__/useMemoCache-test.js b/packages/react-reconciler/src/__tests__/useMemoCache-test.js
index 520cd7cb72463..c07d3a6d9960c 100644
--- a/packages/react-reconciler/src/__tests__/useMemoCache-test.js
+++ b/packages/react-reconciler/src/__tests__/useMemoCache-test.js
@@ -58,7 +58,6 @@ describe('useMemoCache()', () => {
ErrorBoundary = _ErrorBoundary;
});
- // @gate enableUseMemoCacheHook
it('render component using cache', async () => {
function Component(props) {
const cache = useMemoCache(1);
@@ -75,7 +74,6 @@ describe('useMemoCache()', () => {
expect(root).toMatchRenderedOutput('Ok');
});
- // @gate enableUseMemoCacheHook
it('update component using cache', async () => {
let setX;
let forceUpdate;
@@ -145,7 +143,6 @@ describe('useMemoCache()', () => {
expect(data).toBe(data1); // confirm that the cache persisted across renders
});
- // @gate enableUseMemoCacheHook
it('update component using cache with setstate during render', async () => {
let setN;
function Component(props) {
@@ -210,7 +207,6 @@ describe('useMemoCache()', () => {
expect(data).toBe(data0);
});
- // @gate enableUseMemoCacheHook
it('update component using cache with throw during render', async () => {
let setN;
let shouldFail = true;
@@ -293,7 +289,6 @@ describe('useMemoCache()', () => {
expect(data).toBe(data1); // confirm that the cache persisted across renders
});
- // @gate enableUseMemoCacheHook
it('update component and custom hook with caches', async () => {
let setX;
let forceUpdate;
@@ -370,7 +365,6 @@ describe('useMemoCache()', () => {
expect(data).toBe(data1); // confirm that the cache persisted across renders
});
- // @gate enableUseMemoCacheHook
it('reuses computations from suspended/interrupted render attempts during an update', async () => {
// This test demonstrates the benefit of a shared memo cache. By "shared" I
// mean multiple concurrent render attempts of the same component/hook use
@@ -624,7 +618,6 @@ describe('useMemoCache()', () => {
);
});
- // @gate enableUseMemoCacheHook
it('(repro) infinite renders when used with setState during render', async () => {
// Output of react compiler on `useUserMemo`
function useCompilerMemo(value) {
diff --git a/packages/react-server/src/ReactFizzHooks.js b/packages/react-server/src/ReactFizzHooks.js
index e4e81af8fabb8..a163aa11516b7 100644
--- a/packages/react-server/src/ReactFizzHooks.js
+++ b/packages/react-server/src/ReactFizzHooks.js
@@ -41,7 +41,6 @@ import {createFastHash} from './ReactServerStreamConfig';
import {
enableCache,
enableUseEffectEventHook,
- enableUseMemoCacheHook,
enableUseResourceEffectHook,
} from 'shared/ReactFeatureFlags';
import is from 'shared/objectIs';
@@ -859,6 +858,7 @@ export const HooksDispatcher: Dispatcher = supportsClientAPIs
useActionState,
useFormState: useActionState,
useHostTransitionStatus,
+ useMemoCache,
};
if (enableCache) {
@@ -867,9 +867,6 @@ if (enableCache) {
if (enableUseEffectEventHook) {
HooksDispatcher.useEffectEvent = useEffectEvent;
}
-if (enableUseMemoCacheHook) {
- HooksDispatcher.useMemoCache = useMemoCache;
-}
if (enableUseResourceEffectHook) {
HooksDispatcher.useResourceEffect = supportsClientAPIs
? noop
diff --git a/packages/react-server/src/ReactFizzServer.js b/packages/react-server/src/ReactFizzServer.js
index f245861ba0012..ad6721ec60796 100644
--- a/packages/react-server/src/ReactFizzServer.js
+++ b/packages/react-server/src/ReactFizzServer.js
@@ -65,8 +65,6 @@ import {
pushTextInstance,
pushStartInstance,
pushEndInstance,
- pushStartCompletedSuspenseBoundary,
- pushEndCompletedSuspenseBoundary,
pushSegmentFinale,
getChildFormatContext,
writeHoistables,
@@ -155,7 +153,6 @@ import {
disableLegacyContext,
disableLegacyContextForFunctionComponents,
enableScopeAPI,
- enableSuspenseAvoidThisFallbackFizz,
enableCache,
enablePostpone,
enableHalt,
@@ -1490,28 +1487,6 @@ function replaySuspenseBoundary(
request.pingedTasks.push(suspendedFallbackTask);
}
-function renderBackupSuspenseBoundary(
- request: Request,
- task: Task,
- keyPath: KeyNode,
- props: Object,
-) {
- const content = props.children;
- const segment = task.blockedSegment;
- const prevKeyPath = task.keyPath;
- task.keyPath = keyPath;
- if (segment === null) {
- // Replay
- renderNode(request, task, content, -1);
- } else {
- // Render
- pushStartCompletedSuspenseBoundary(segment.chunks);
- renderNode(request, task, content, -1);
- pushEndCompletedSuspenseBoundary(segment.chunks);
- }
- task.keyPath = prevKeyPath;
-}
-
function renderHostElement(
request: Request,
task: Task,
@@ -2194,14 +2169,7 @@ function renderElement(
throw new Error('ReactDOMServer does not yet support scope components.');
}
case REACT_SUSPENSE_TYPE: {
- if (
- enableSuspenseAvoidThisFallbackFizz &&
- props.unstable_avoidThisFallback === true
- ) {
- renderBackupSuspenseBoundary(request, task, keyPath, props);
- } else {
- renderSuspenseBoundary(request, task, keyPath, props);
- }
+ renderSuspenseBoundary(request, task, keyPath, props);
return;
}
}
diff --git a/packages/react-server/src/forks/ReactFizzConfig.custom.js b/packages/react-server/src/forks/ReactFizzConfig.custom.js
index 02ce1e4e2afee..be14f349aa286 100644
--- a/packages/react-server/src/forks/ReactFizzConfig.custom.js
+++ b/packages/react-server/src/forks/ReactFizzConfig.custom.js
@@ -51,10 +51,6 @@ export const makeId = $$$config.makeId;
export const pushTextInstance = $$$config.pushTextInstance;
export const pushStartInstance = $$$config.pushStartInstance;
export const pushEndInstance = $$$config.pushEndInstance;
-export const pushStartCompletedSuspenseBoundary =
- $$$config.pushStartCompletedSuspenseBoundary;
-export const pushEndCompletedSuspenseBoundary =
- $$$config.pushEndCompletedSuspenseBoundary;
export const pushSegmentFinale = $$$config.pushSegmentFinale;
export const pushFormStateMarkerIsMatching =
$$$config.pushFormStateMarkerIsMatching;
diff --git a/packages/shared/ReactFeatureFlags.js b/packages/shared/ReactFeatureFlags.js
index 8ac0fd86e28ed..f28d123e61e5b 100644
--- a/packages/shared/ReactFeatureFlags.js
+++ b/packages/shared/ReactFeatureFlags.js
@@ -108,16 +108,11 @@ export const enableLegacyHidden = false;
// Enables unstable_avoidThisFallback feature in Fiber
export const enableSuspenseAvoidThisFallback = false;
-// Enables unstable_avoidThisFallback feature in Fizz
-export const enableSuspenseAvoidThisFallbackFizz = false;
export const enableCPUSuspense = __EXPERIMENTAL__;
export const enableHydrationLaneScheduling = true;
-// Enables useMemoCache hook, intended as a compilation target for
-// auto-memoization.
-export const enableUseMemoCacheHook = true;
// Test this at Meta before enabling.
export const enableNoCloningMemoCache = false;
diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb.js b/packages/shared/forks/ReactFeatureFlags.native-fb.js
index 1948a38163cca..4d89fa091061a 100644
--- a/packages/shared/forks/ReactFeatureFlags.native-fb.js
+++ b/packages/shared/forks/ReactFeatureFlags.native-fb.js
@@ -73,14 +73,12 @@ export const enableComponentPerformanceTrack = false;
export const enableScopeAPI = false;
export const enableServerComponentLogs = true;
export const enableSuspenseAvoidThisFallback = false;
-export const enableSuspenseAvoidThisFallbackFizz = false;
export const enableSuspenseCallback = true;
export const enableTaint = true;
export const enableTransitionTracing = false;
export const enableTrustedTypesIntegration = false;
export const enableUpdaterTracking = __PROFILE__;
export const enableUseEffectEventHook = false;
-export const enableUseMemoCacheHook = true;
export const favorSafetyOverHydrationPerf = true;
export const renameElementSymbol = false;
export const retryLaneExpirationMs = 5000;
diff --git a/packages/shared/forks/ReactFeatureFlags.native-oss.js b/packages/shared/forks/ReactFeatureFlags.native-oss.js
index 12d1598e6a16e..0407f01910b75 100644
--- a/packages/shared/forks/ReactFeatureFlags.native-oss.js
+++ b/packages/shared/forks/ReactFeatureFlags.native-oss.js
@@ -63,13 +63,11 @@ export const enableScopeAPI = false;
export const enableServerComponentLogs = true;
export const enableShallowPropDiffing = false;
export const enableSuspenseAvoidThisFallback = false;
-export const enableSuspenseAvoidThisFallbackFizz = false;
export const enableSuspenseCallback = false;
export const enableTaint = true;
export const enableTransitionTracing = false;
export const enableTrustedTypesIntegration = false;
export const enableUseEffectEventHook = false;
-export const enableUseMemoCacheHook = true;
export const favorSafetyOverHydrationPerf = true;
export const passChildrenWhenCloningPersistedNodes = false;
export const renameElementSymbol = true;
diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.js
index 609c5628063b9..b83cb9a99fc3d 100644
--- a/packages/shared/forks/ReactFeatureFlags.test-renderer.js
+++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.js
@@ -33,9 +33,7 @@ export const enableSuspenseCallback = false;
export const enableTrustedTypesIntegration = false;
export const disableTextareaChildren = false;
export const enableSuspenseAvoidThisFallback = false;
-export const enableSuspenseAvoidThisFallbackFizz = false;
export const enableCPUSuspense = false;
-export const enableUseMemoCacheHook = true;
export const enableNoCloningMemoCache = false;
export const enableUseEffectEventHook = false;
export const favorSafetyOverHydrationPerf = true;
diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
index 169c5c9e2878b..115117685aeb4 100644
--- a/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
+++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
@@ -57,14 +57,12 @@ export const enableScopeAPI = false;
export const enableServerComponentLogs = true;
export const enableShallowPropDiffing = false;
export const enableSuspenseAvoidThisFallback = false;
-export const enableSuspenseAvoidThisFallbackFizz = false;
export const enableSuspenseCallback = false;
export const enableTaint = true;
export const enableTransitionTracing = false;
export const enableTrustedTypesIntegration = false;
export const enableUpdaterTracking = false;
export const enableUseEffectEventHook = false;
-export const enableUseMemoCacheHook = true;
export const favorSafetyOverHydrationPerf = true;
export const passChildrenWhenCloningPersistedNodes = false;
export const renameElementSymbol = false;
diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
index 6ecd34dfbd1bd..cad15eecc8c11 100644
--- a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
+++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
@@ -35,9 +35,7 @@ export const disableLegacyContextForFunctionComponents = false;
export const enableTrustedTypesIntegration = false;
export const disableTextareaChildren = false;
export const enableSuspenseAvoidThisFallback = true;
-export const enableSuspenseAvoidThisFallbackFizz = false;
export const enableCPUSuspense = false;
-export const enableUseMemoCacheHook = true;
export const enableNoCloningMemoCache = false;
export const enableUseEffectEventHook = false;
export const favorSafetyOverHydrationPerf = true;
diff --git a/packages/shared/forks/ReactFeatureFlags.www.js b/packages/shared/forks/ReactFeatureFlags.www.js
index be91e1c8e4ecd..eea2ba4230f50 100644
--- a/packages/shared/forks/ReactFeatureFlags.www.js
+++ b/packages/shared/forks/ReactFeatureFlags.www.js
@@ -51,10 +51,8 @@ export const enableUpdaterTracking = __PROFILE__;
export const enableFabricCompleteRootInCommitPhase = false;
export const enableSuspenseAvoidThisFallback = true;
-export const enableSuspenseAvoidThisFallbackFizz = false;
export const enableCPUSuspense = true;
-export const enableUseMemoCacheHook = true;
export const enableUseEffectEventHook = true;
export const enableMoveBefore = false;
export const disableInputAttributeSyncing = false;