Identifier for component type in production builds
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
In production builds of the application
process.env.NODE_ENV === 'production'
all MUI components are anonymous and do not tell the developer which component was rendered.
I am searching for a solution which help to identify the underlying component such as TextField.
Examples 🌈
No response
Motivation 🔦
I am the author of mui-validate a validation library for MUI components.
To validate inputs the MUI components need to be wrapped with higher order components which need to be able to identify the wrapped childs type i.e. TextField.
A solution could have ben to access the childs displayName but this is stripped out in production builds from your side.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining how MUI components expose displayName and how production builds behave under process.env.NODE_ENV === 'production', using TextField as the example. Define what supported component identification should look like for wrapped components and verify it in a production build; the issue names no files or tests, so repository discovery is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100