timolins / react-hot-toast

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

Toaster gives Unhandled RunTime Error on Nextjs #318

Open GuilhermeCF10 opened 1 year ago

GuilhermeCF10 commented 1 year 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 1 year ago

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

timolins commented 1 year 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 1 year ago

same for me here @kikohz

irmakcosarsahna commented 9 months ago

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

bonesoul commented 7 months ago

same issue here.

KevinTss commented 4 months ago

+1

abury commented 2 months 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.