fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.33k stars 676 forks source link

React toast usage error #1071

Open RajeshCShettigar opened 4 months ago

RajeshCShettigar commented 4 months ago

Do you want to request a feature or report a bug? bug What is the current behavior? i am getting this error when using react toastify.

Uncaught TypeError: Cannot set properties of undefined (setting 'toggle') at Object.setToggle (clsx.mjs:1:384) at N (clsx.mjs:1:384) at R (clsx.mjs:1:384) at renderWithHooks (react-dom.development.js:16305:18) at updateFunctionComponent (react-dom.development.js:19588:20) at beginWork (react-dom.development.js:21601:16) at beginWork$1 (react-dom.development.js:27426:14) at performUnitOfWork (react-dom.development.js:26557:12) at workLoopSync (react-dom.development.js:26466:5) at renderRootSync (react-dom.development.js:26434:7)

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? I am using latest version of vite-react and tailwindCSS

guduchango commented 1 month ago

I had the same error, tried everything again on a new react page, and it worked. I think the mistake was that I added this in two different places.

import 'react-toastify/dist/ReactToastify.css';

I hope it helps, greetings.

RajeshCShettigar commented 1 month ago

I had the same error, tried everything again on a new react page, and it worked. I think the mistake was that I added this in two different places.

import 'react-toastify/dist/ReactToastify.css';

I hope it helps, greetings.

Thank you

FleetAdmiralJakob commented 3 weeks ago

I did not import this stuff twice. but still get the error

I use tailwindcss too together with next.js

luc345 commented 3 weeks ago

Same Issue, but I haven't found a solution yet. Can someone help .. Thank you.