DEV Community

Discussion on: Naming things is hard. Agree or disagree?

Collapse
 
iamschulz profile image
Daniel Schulz

I like BEM for it's structure and still use it in combination with scoped CSS in Vue, but it works without scoping as well.
Think of your component as the block, then structure down from there and keep it as simple as possible. If you run into naming problems, your component might be getting too big.
Do you use a design system or build your app from scratch?

Collapse
 
jamesthomson profile image
James Thomson

That’s pretty much how I work as well, except for the scoped css in Vue. My components stay small, but the issue becomes that I have the need for so many components I run out of names for the various types. I should note that I don’t really work on your standard Dashboard UI, those components are easier to name. I work on quite creatively driven mockups (think games) that the components aren’t immediately obvious as to what they are. To give insight my current project has over 100 unique Vue components (though a handful are HOCs).

App(s) are built from scratch.