Open Claim0013 opened 6 years ago
Nevermind, solved it myself.
How did you solve it? I have the same problem. @Claim0013
How did you solve it? I have the same problem. @Claim0013
Hey I'm really sorry but this was so long ago - I don't remember how I solved it but I can hint you over to react-toastify. You just add that once in your index.js
and then call it as toast.info/error/success
in the file you want the message.
The issue you're running into may be related to importing the component itself (not the method) in multiple files so maybe look out for that.
For instance with react-toastify
you only do import { ToastContainer } from 'react-toastify';
once in index.js
and then just use toast.info
wherever you want.
So just do import {NotificationContainer, NotificationManager} from 'react-notifications';
once in a dedicated file only for messages and import the methods from there.
Hope that helps.
I am using Material Ui and in one particular window I have a Dialog that opens another Dialog where if something happens a notification goes off.
Now it seems as if the notification has its root in the first Dialog, which is wrong. It should be in the second Dialog.
Here's a screenshot of what this looks like.
Any help appreciated.