question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

broken ToastContainers with enableMultiContainer and one unmounted ToastContainer

See original GitHub issue

First, thank you very much to all contributors!

Do you want to request a feature or report a bug? report a bug

What is the current behavior? eventManager.off(ACTION.SHOW).off(ACTION.CLEAR).emit(ACTION.WILL_UNMOUNT, this); which will be triggered on componentWillUnmount of a ToastContainer removes event-handlers of all ToastContainer and not only the event-handlers for the ToastContainer which will be unmounted. Unfortunately this (one global and multiple ToastContainers) is exactly my use case.

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: Demo: https://codesandbox.io/embed/react-toastify-with-multiple-toastcontainer-21t16

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
fkhadracommented, Nov 10, 2019

Hey the v5.4.1 fix the issue.

1reaction
m4r71ncommented, Nov 13, 2019

Works. Again, thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi containers | React-Toastify - GitHub Pages
To enable multiple containers support, you have to pass enableMultiContainer and specify a containerId and use it in each toast, to do so...
Read more >
react-toastify - npm
One component to rule them all. One ToastContainer to render them · Positioning toast · Set autoclose delay or disable it · Render...
Read more >
Lazy container and multi-container | Material-React-Toastify
To enable multiple container support, you have to pass enableMultiContainer and specify a containerId and use it in each toast, to do so...
Read more >
Fkhadra React-Toastify Issues - IssueHint
react-toastify Recent Issues ; Toast Update: enableMultiContainer breaks it, open, 6, 2022-10-15, 2022-11-25 ; Clsx is not a function, open, 1, 2022-10-11, 2022- ......
Read more >
Fadi Khadra react-toastify Issues - Giters
Updated 5 days ago 1 ... Warning: React does not recognize the `closeToast` prop on a DOM element ... Toast Update: enableMultiContainer breaks...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found