What version of astro are you using?
1.0.0-beta.2
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
@astrojs/react: 0.1.0
React components loaded with client:only show a hydration error:

The component still works, it just makes React unhappy. client:only skips the component at build time, so there's nothing to hydrate. React components rendered withclient:only should probably use createRoot instead of hydrateRoot:
Though in looking at the code, there is a suppressHydrationWarning flag - is that related?:
|
{ ...props, suppressHydrationWarning: true }, |
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-2hpcon
Participation
What version of
astroare you using?1.0.0-beta.2
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
@astrojs/react:0.1.0React components loaded with
client:onlyshow a hydration error:The component still works, it just makes React unhappy.
client:onlyskips the component at build time, so there's nothing to hydrate. React components rendered withclient:onlyshould probably usecreateRootinstead ofhydrateRoot:astro/packages/integrations/react/client.js
Line 6 in 1335797
Though in looking at the code, there is a
suppressHydrationWarningflag - is that related?:astro/packages/integrations/react/client.js
Line 10 in 1335797
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-2hpcon
Participation