summaryrefslogtreecommitdiff
path: root/packages/integrations/react/client.js
diff options
context:
space:
mode:
authorGravatar JuanM04 <me@juanm04.com> 2022-03-31 15:11:56 -0300
committerGravatar JuanM04 <me@juanm04.com> 2022-03-31 15:11:56 -0300
commit764467a21dd27285db426c329b4d9d6c9e08f292 (patch)
tree4475406c0a66b5e45867a1f859d65c04ad265f47 /packages/integrations/react/client.js
parente890b528c4c3045d4dc04fb74fc1a739d4f8f618 (diff)
parentd81b6d9ebc2176690aac3f538e84b5566acbdff4 (diff)
downloadastro-764467a21dd27285db426c329b4d9d6c9e08f292.tar.gz
astro-764467a21dd27285db426c329b4d9d6c9e08f292.tar.zst
astro-764467a21dd27285db426c329b4d9d6c9e08f292.zip
Merge branch 'main' into feat/vercel-adapter
Diffstat (limited to 'packages/integrations/react/client.js')
-rw-r--r--packages/integrations/react/client.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/integrations/react/client.js b/packages/integrations/react/client.js
index a6bc7d3bc..11d63cfcb 100644
--- a/packages/integrations/react/client.js
+++ b/packages/integrations/react/client.js
@@ -1,13 +1,13 @@
import { createElement } from 'react';
-import { hydrate } from 'react-dom';
+import { hydrateRoot } from 'react-dom/client';
import StaticHtml from './static-html.js';
export default (element) => (Component, props, children) =>
- hydrate(
+ hydrateRoot(
+ element,
createElement(
Component,
{ ...props, suppressHydrationWarning: true },
children != null ? createElement(StaticHtml, { value: children, suppressHydrationWarning: true }) : children
- ),
- element
+ )
);