More meaningful/semantic class names during development
See original GitHub issueCurrently all generated class names look like this:
And it really causes problems while debugging. I do not understand where I am. Well of course I can switch between react devtools and inspector – but it does not make it more convenient.
Is it possible to use class names similar to styled components names. Maybe with random prefix like:
const Wrapper = styled.div`
background: red;
`;
and the class name will be like .frh743-Wrapper
or smth like this.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:24
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Semantic Class Naming - Ukiah Smith
Semantic class naming is a style in which we use class names that describe what an element is, or it's intended purpose, rather...
Read more >What Makes For a Semantic Class Name? | CSS-Tricks
“Semantic” class or ID names give zero benefits to users. They only affect developers, and developers should choose whatever works best for ...
Read more >Use class with semantics in mind - Quality Web Tips - W3C
Use class with semantics in mind. Often people use class names like bluetext , or redborder . A much better way to name...
Read more >Semantic class names: are you being too generic? - Medium
Most developers choose generic class names. In theory, this is a good because the more generic the class name, the more reusable it...
Read more >How to semantically name your classes - CoffeeCup Software
Semantic class names should not be too narrow, but not too broad either. Somewhere right in the middle, the sweetspot! During our research...
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 FreeTop 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
Top GitHub Comments
Yes, you can use the babel plugin to attach the displayName to the component’s class https://github.com/styled-components/babel-plugin-styled-components
What about using that in a type script environment?