-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
DefaultPropsProvider breaks microfrontend setups - please move to @mui/styles #43186
Comments
The Can you provide a reproducible sandbox that replicate the issue you are facing? I can take a look. |
@siriwatknp thanks for the reply! We already share I will look into a reproducible example, but unfortunately our setup is proprietary and quite complex. |
The behavior should already be the same for the One thing to make sure is to check that you have the same versions everywhere - this is most often the issue for ending up with different contexts. |
Close this issue as I think it's related to the setup, not Material UI. Feel free to reopen with reproducible sandbox/repo, I'm happy to take a look. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @csvan How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Summary
The newly introduced
DefaultPropsProvider
(#42820) causes problems in micro-frontend setups, since it is located in the main@mui/material
package which is usually too big to be shared between modules in a micro-frontend environment.The root of the problem is that each module in the environment will get its own instance of
DefaultPropsProvider
, meaning that custom properties injected in an orchestrator (e.g. an App Shell) are erased on the module-level.The common way to solve this issue would be to instead move this provider to a smaller, shareable package which can be shared. The best place is probably
@mui/styles
, which also houses theThemeProvider
(which also needs to be shared across modules).Examples
No response
Motivation
Better support for micro-frontends.
Search keywords: DefaultPropsProvider
The text was updated successfully, but these errors were encountered: