fkhadra / fkhadra/react-toastify
Toast Container in module federation architecture
- Dominant language
- TypeScript
- Stars
- 13.4k
- Forks
- 741
- PR merge metrics
- No merged PRs in 30d
Description
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(
}>
,
);`
where App in its turn has Routes to remote apps.
So, in terms of DOM all the remote apps are nested under shell-root
Any remote app in its turn is rendered in its own root
`const root = createRoot(mountPoint); // mountPoint, for example, is maintenance-mfe`
`root.render(
,
);`
Contributor guide
Research direction
Start by reproducing the shell and remote setup described around root.render, createRoot, ToastContainer, and toast. Check whether a toast triggered from the remote reaches the shell's ToastContainer; done means the remote can display a toast while both roots are mounted, with the behavior verified against this module-federation arrangement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript, webpack
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100