timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.73k stars 323 forks source link

Toaster gives Unhandled RunTime Error on Nextjs #318

Open GuilhermeCF10 opened 11 months ago

GuilhermeCF10 commented 11 months ago

image

image

So in this case, when it comes in the layout Toaster, it gives this error:

Unhandled Runtime Error Error: Hydration failed because the initial UI does not match what was rendered on the server.

See more info here: https://nextjs.org/docs/messages/react-hydration-error

kikohz commented 11 months ago

Same here I have this error and have tried many ways to do it but it doesn't work

timolins commented 11 months ago

Hi! I tried to replicate this issue on StackBlitz, but it appears to work fine. Can you confirm that this issue is indeed caused by react-hot-toast?

pierremouchan commented 10 months ago

same for me here @kikohz

irmakcosarsahna commented 8 months ago

I can confirm that I am experiencing the same issue, and it appears to be originating from react-hot-toast.

bonesoul commented 5 months ago

same issue here.

KevinTss commented 2 months ago

+1

abury commented 3 weeks ago

Likewise here Edit I moved my Toaster component around in my root layout until it stopped throwing this error, for me having it just below the starting <body> tag seemed to fix this.