You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Call useId in a client component in the app directory.
Start the app with next dev
On the first request, useId ids will mismatch between SSR and browser.
Describe the Bug
I see behavior where useId ids mismatch between SSR and browser only on the first request after a next dev start. (not in next build/next start)
Unfortunately, I am unable to reproduce the behaviour in a minimal application. The application I am working on right now will be open-sourced in the next few weeks, but I can give you access before that if you ask me for it here. We have open sourced the Apollo Client Next.js App Router library now, and this bug happens in our example apps, which you can find here: https://github.com/apollographql/apollo-client-nextjs/tree/main/examples/hack-the-supergraph-ssr
Expected Behavior
In SSR and browser, useId generates the same ids at all times.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
next dev
The text was updated successfully, but these errors were encountered:
I mean that PR says it fixes a bug that was introduced last week, and this ticket is from April, so probably not? Admittedly, I haven't seen that hydration mismatch for a while, but it could be something I changed on our side.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 19.6.1 npm: 9.4.0 Yarn: 3.5.0 pnpm: 8.0.0 Relevant packages: next: 13.3.1-canary.4 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://github.com/apollographql/apollo-client-nextjs/tree/main/examples/hack-the-supergraph-ssr
To Reproduce
useId
in a client component in theapp
directory.next dev
useId
ids will mismatch between SSR and browser.Describe the Bug
I see behavior where
useId
ids mismatch between SSR and browser only on the first request after anext dev
start. (not innext build/next start
)Unfortunately, I am unable to reproduce the behaviour in a minimal application.
The application I am working on right now will be open-sourced in the next few weeks, but I can give you access before that if you ask me for it here.We have open sourced the Apollo Client Next.js App Router library now, and this bug happens in our example apps, which you can find here: https://github.com/apollographql/apollo-client-nextjs/tree/main/examples/hack-the-supergraph-ssrExpected Behavior
In SSR and browser,
useId
generates the same ids at all times.Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
next dev
The text was updated successfully, but these errors were encountered: