You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi on our application we are using two instances of a toastr component. One of them is global and is instantiated straight away in the root component. But our users can see a portion of the application in fullscreen and we instantiate another toastr component when we move to fullscreen. We realised that when the second one unmounts, the global one stops working. Inspecting the code we saw that the unmounting toastr removes all listeners breaking the communication of the global one.
The text was updated successfully, but these errors were encountered:
Hi @gowikel, the easiest way to solve this will be to add another prop like removeEventEmitterOnUnmounthere which is default to true and in componentWillUnmount we could check for it and preventing from removing the listeners based on that.
Hi on our application we are using two instances of a toastr component. One of them is global and is instantiated straight away in the root component. But our users can see a portion of the application in fullscreen and we instantiate another toastr component when we move to fullscreen. We realised that when the second one unmounts, the global one stops working. Inspecting the code we saw that the unmounting toastr removes all listeners breaking the communication of the global one.
The text was updated successfully, but these errors were encountered: