From 1519a256de63432894a657922e8e1eacd130cf0b Mon Sep 17 00:00:00 2001 From: Mahesh Makani Date: Tue, 17 Sep 2024 09:28:08 +0100 Subject: [PATCH] fix(react): use `hydrateRoot` --- src/client/static/hydration.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/static/hydration.tsx b/src/client/static/hydration.tsx index 887794427..dc146af75 100644 --- a/src/client/static/hydration.tsx +++ b/src/client/static/hydration.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { record } from '@/client/lib/ophan'; -import { hydrate } from 'react-dom'; +import { hydrateRoot } from 'react-dom/client'; import { RoutingConfig } from '@/client/routes'; import { App } from '@/client/app'; import { tests } from '@/shared/model/experiments/abTests'; @@ -51,7 +51,8 @@ export const hydrateApp = ({ routingConfig }: Props) => { getCurrentHub().bindClient(client); } - hydrate( + hydrateRoot( + document.getElementById('app')!, { > , - document.getElementById('app'), ); };