react-toastify: autoClose doesn't work with react 0.14.*
Hi,
I’m facing an issue with autoClose. I follow your example, everything works but the toast will never close until triggered manually. I also try your custom animation, The enter event fired, but the exit didn’t.
Here is my code snippet:
– Toast Container settings:
<ToastContainer
position="top-right"
type="error"
autoClose={4000}
/>
– I create a toast by:
toast("Hello", { autoClose: 4000 });
What did I do wrong here?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (8 by maintainers)
Me too facing the same issue. Does anyone know how to fix this webpack issue . The progressbar and auto close is not working
In my case, autoClose was not working because I had not imported all of the CSS files. If you are manually copying the CSS, make sure to include the ProgressBar styles, even if you aren’t actually displaying the progress bar. The component relies on the ProgressBar styling to know when to close the toast (when the ProgressBar animation ends)
@JustFly1984 could you reproduce the issue on codesandbox, so I can help you?
Thanks.