timolins / react-hot-toast

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

Objects are not valid as a React child (found: Error: Something went wrong!) #211

Closed amanzrx4 closed 2 years ago

amanzrx4 commented 2 years ago

Hi, I'm trying to do thistoast.error(error || "Something went wrong!")), basically if error is undefined i want to pass something went wrong string but it is not working i think toast is trying to render this without evaluating the expression inside it. Is there any way to achieve this functionality

amanzrx4 commented 2 years ago

Oh i got it, it was some syntax error