Improve documentation about when the setting of property "muiName" is really necessary
See original GitHub issueQuestion and feature request:
In the documentation for v0.19.0 there are some examples, e.g. for AppBar
, where the property muiName
is set. In most of the other examples in the documentation this property is not set. In the documentation for v1.0.0-beta.7 it reads
[…] we tag some of our components when needed with a muiName static property.
My question would be, what is meant by “when needed”? Most examples don’t set muiName
, although they all define React subcomponents and wrap Material-UI components in one way or another. Also see my initial question on stackoverflow.
Could you please elaborate further on when and how to use muiName
in the documentation and maybe also update the component examples, in case setting of muiName
is missing anywhere due to sloppiness.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Improve documentation about when the setting of property ...
My question would be, what is meant by "when needed"? Most examples don't set muiName , although they all define React subcomponents and...
Read more >What is the muiName property and when do I have to set it for ...
Answer in documentation is: In order to provide the maximum flexibility and performance, we need a way to know the nature of the...
Read more >Composition - Material UI - MUI
To solve this problem, we tag some of the components with a muiName static property when needed. You may, however, need to wrap...
Read more >material-ui/core/CHANGELOG.md - UNPKG
- ⚛️ A first step toward converting all the demos to React Hooks (#13873) @adeelibr. 124, - And many more bug fixes and...
Read more >@mui/icons-material | Yarn - Package Manager
Important : This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Don’t worry, this is an advanced feature. You don’t need to worry about it until you face the issue.
The React tree structure is essential to understand the why around the
muiName
existence. Let’s say we have the following.The
Parent
wants to apply a color property to only theIcon
children, but he can also have aText
children. How does he know which children are how? He uses themuiName
.I would rather use the composition wording over the wrap one. We refer to wrap at the component level, not the element one.
I hope it’s more clear this way. Sorry I couldn’t go into more details. You can find a better channel than Material-UI issues to learn more about React 😃.
Thank you for clarifying further Olivier.
That’s fine. How would you I notice if the issue becomes important for me? Would there be warnings in my browser’s javascript console? Or would there just be styling issues?