-
Notifications
You must be signed in to change notification settings - Fork 1.2k
SSR β Mismatched server / client ids when running in StrictMode
#2231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for finding this. I just confirmed this locally, and only see it in Strict Mode. We currently don't support Strict Mode, but we are working on it. We'll be sure to look for warnings with SSR in Strict Mode like this, and close this out if it gets handled in a blanket Strict Mode issue. |
FYI React 18 beta has |
Thanks, @devongovett has been keeping an eye on it reactwg/react-18#111 (comment) |
Hello there! Any news on this now that React 18 has been released? |
Closing in favor of the umbrella strict mode issue #779 |
Aria's useSSRSafeId isn't actually safe (it generates different IDs on server than client), see adobe/react-spectrum#2231
Aria's useSSRSafeId isn't actually safe (it generates different IDs on server than client), see adobe/react-spectrum#2231
π Bug Report
Ids mismatch during SSR running in StrictMode (this example is with Next.js, but I believe it does happen with all SSR approaches)
π€ Expected Behavior
Ids to match in Server and Client
π― Current Behavior
Ids don't match between Server and Client during SSR.
π¦ Context
I'm trying to have react-aria hooks working with Next.js in SSR.
This seems to happen in other libraries like radix-ui/primitives#811
π» Code Sample
https://codesandbox.io/s/react-spectrum-nextjs-wp58t?file=/pages/index.js
Open the console tab and see the warning there
π Your Environment
π§’ Your Company/Team
The text was updated successfully, but these errors were encountered: