Skip to content
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

Select Components used in Next.js will cause hydration error when LocalizedStringProvider's locale is not 'en' #7366

Open
Dilettante258 opened this issue Nov 14, 2024 · 0 comments

Comments

@Dilettante258
Copy link

Provide a general summary of the issue here

When use Select components with SSR and configured LocalizedStringProvider, it will give rise to a hydration error. It is relevant to SelectValue's placeholder.

🤔 Expected Behavior?

When set LocalizedStringProvider in Next.js and use some components, it shouldn't occur hydration error.

😯 Current Behavior

image

💁 Possible Solution

If set Select's placeholder manually, it won't happened.

https://github.com/adobe/react-spectrum/blob/262cc758b8625002314d3574d3e5269aded7db6c/packages/react-aria-components/src/Select.tsx#L258-265

🔦 Context

No response

🖥️ Steps to Reproduce

https://codesandbox.io/p/devbox/3mjhq3

use Next.js@14

Version

"react-aria-components": "^1.4.1",

What browsers are you seeing the problem on?

Microsoft Edge

If other, please specify.

No response

What operating system are you using?

Windows 11

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant