diff --git a/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js b/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js index 4d821091a2750..4d8e677e03739 100644 --- a/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js @@ -5330,6 +5330,9 @@ describe('ReactDOMFizzServer', () => { }); expect(getVisibleChildren(container)).toEqual(['AB', 'C']); + // Hydration uses a different renderer runtime (Fiber instead of Fizz). + // We reset _currentRenderer here to not trigger a warning about multiple + // renderers concurrently using these contexts ContextA._currentRenderer = null; ServerContext._currentRenderer = null; ReactDOMClient.hydrateRoot(container, ); diff --git a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js index 2a3d5cefa1bca..f477bba451a6e 100644 --- a/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js +++ b/packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js @@ -619,6 +619,9 @@ describe('ReactFlightDOMBrowser', () => { const container = document.createElement('div'); const root = ReactDOMClient.createRoot(container); await act(async () => { + // Client uses a different renderer. + // We reset _currentRenderer here to not trigger a warning about multiple + // renderers concurrently using this context ContextA._currentRenderer = null; root.render(); });