Hydration errors with useId on on Next 15.5
Unanswered
Paper wasp posted this in #help-forum
Paper waspOP
Is anyone else seeing hydration errors in dev mode with useId() after upgrading to 15.5? Simply having a client component in page.tsx with a useId in it and having that ID in the JSX causes hydration errors - but not always, maybe 50% ish of renders.
I haven't bothered bisecting to figure out exactly when this was introduced, but I've started seeing a lot of these lately so I'm just curious if it's something weird in our setup or if anyone else are getting hydration errors as well. Also haven't found anything in issue trackers or Google, so maybe it's just us 🙂
I haven't bothered bisecting to figure out exactly when this was introduced, but I've started seeing a lot of these lately so I'm just curious if it's something weird in our setup or if anyone else are getting hydration errors as well. Also haven't found anything in issue trackers or Google, so maybe it's just us 🙂
7 Replies
Paper waspOP
just downgraded to 15.4.5 and react/react-dom 19.1.0, still getting the hydration errors 🤔
strange, the error from nextjs and the output of the id in the console varies wildly (the one in the console also matches what's rendered in the DOM)
Paper waspOP
🦆 removing most of my layout code made the error go away. So it's defenitely something weird about my setup. Will report back when I find the culprit 🙂
Paper waspOP
haha, this is properly strange. Removed most of my layout code etc, and now it happens much more rarely, but it still happens every now and then (maybe 1/30 or so)
Alligator mississippiensis
hi, mate
did you use the UUID for userId?
I have seen same error in that case.