Open mvarakin opened 1 month ago
Hi,
I solved this issue by creating a global globalToast variable that all micro frontends (MFEs) can access. Ensure there's only one ToastContainer in the host app, and every remote app can trigger toasts without any issues.
if (!window.globalToast) { window.globalToast = toast; }
This way, the ToastContainer remains in the shell app, and the toast() function can be accessed globally by all remote apps.
Hello,
I have a micro front end architecture with shell app and remote apps following webpack module federation approach. I add ToastContainer to shell app but my remote apps seem to not see it. toast(..) just does nothing. Looks like the container is unregistered once a remote app is mounted.
Shell is rendered this way `root.render(