toast container throws error when autoclose time is up.
Do you want to request a feature or report a bug?
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
What is the expected behavior?
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
here is the error on console
Uncaught TypeError: Cannot set properties of undefined (setting 'toggle') at Object.setToggle (react-toastify.js?v=753153fc:143:29) at N (react-toastify.js?v=753153fc:193:111) at R (react-toastify.js?v=753153fc:307:104) at renderWithHooks (chunk-OCHDJWGW.js?v=753153fc:12171:26) at updateFunctionComponent (chunk-OCHDJWGW.js?v=753153fc:14577:28) at beginWork (chunk-OCHDJWGW.js?v=753153fc:15912:22) at HTMLUnknownElement.callCallback2 (chunk-OCHDJWGW.js?v=753153fc:3674:22) at Object.invokeGuardedCallbackDev (chunk-OCHDJWGW.js?v=753153fc:3699:24) at invokeGuardedCallback (chunk-OCHDJWGW.js?v=753153fc:3733:39) at beginWork$1 (chunk-OCHDJWGW.js?v=753153fc:19761:15)
I have what seems to be the same bug. It doesn't happen unless I have two separate toasts run concurrently. If it helps, I have a shared component which defines the ToastContainer. I've tried specifying an id to the ToastContainer but the bug persisted.
Uncaught TypeError: can't access property "toggle", v.get(...) is undefined
setToggle react-toastify.esm.mjs:2
N react-toastify.esm.mjs:2
R react-toastify.esm.mjs:2
React 16
T react-toastify.esm.mjs:2
N react-toastify.esm.mjs:2
React 25
renderReactElement index.js:421
doRender index.js:579
render index.js:596
hydrate index.js:724
pageBootrap page-bootstrap.js:24
<anonymous> next-dev.js:25
promise callback* next-dev.js:23
NextJS 7
react-toastify.esm.mjs:2:3992
Uncaught TypeError: can't access property "toggle", v.get(...) is undefined
setToggle react-toastify.esm.mjs:2
N react-toastify.esm.mjs:2
R react-toastify.esm.mjs:2
React 17
T react-toastify.esm.mjs:2
N react-toastify.esm.mjs:2
React 25
renderReactElement index.js:421
doRender index.js:579
render index.js:596
hydrate index.js:724
pageBootrap page-bootstrap.js:24
<anonymous> next-dev.js:25
promise callback* next-dev.js:23
NextJS 7
react-toastify.esm.mjs:2:3992
I tried to downgrade toast version to 9.0.3 and it is working fine, i don't know if its problem with new version or something else.
I had the same problem and the temporary solution was to remove transition: 'Bounce' from the toast container and toast emitter.
I had the same problem and the temporary solution was to remove
transition: 'Bounce'from the toast container and toast emitter.
Yes i have mentioned it in #1091 and also solved it
I have the same issue, but I am not using transition: 'Bounce'
I also have the same issue, and I'm not even passing any properties to the ToastContainer component