-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Host MFE is showing others duplicated MFEs in Client Side #2925
Comments
It means multiple version of react are loading. Ensure pages have a get initial props and see if that makes it any better. Ensure that all remotes use import from only and not loadRemote. Try not using ISR or any other data loading, just put get initial props on every single page in every application and see what happens then. I'd also suggest using modernjs which is designed for these use cases. Next is barely functional. |
Hi @ScriptedAlchemy , thanks for the quick response! How can I avoid multiples version of react? Using shared property? Could you show me an example? |
Try copying one of my examples and making minimal changes to it. Or ass getInitialProps to all your pages everywhere. Since some do not have that |
Hi @ScriptedAlchemy
When this error happen the MFE is only rendered on the client side. Have you experience this error before? What could be causing this? |
Yeah if it's a non ssr remote then you need to prevent hydration errors |
Got it! We solved the previous error and it was related to how we loaded emotion library. Now we see another error in our logs
Is there something related about ESM Modules in Next.js? How can we solve this? |
Describe the bug
In our production project, we are experiencing some very strange errors related to the extra loading of MFEs by the MFE Host. To provide context, we basically have our MFE Composer that communicates with MFE Mid, which in turn communicates with the other MFEs (header, content, footer). We have noticed that at certain moments the MFE Content and MFE Footer are appearing duplicated, and this behavior occurs on the client side but the project configured to use server side.
repro.video.mov
We have another project that follows the same architecture and this errors also appears and some MFEs sometimes they are rendered client side, sometimes server side.
Repos:
Reproduction
https://composer-psi.vercel.app
Used Package Manager
yarn
System Info
Validations
The text was updated successfully, but these errors were encountered: