marcohamersma / react-bem-helper

react-bem-helper allows you to easily add BEM-style element and modifier classes to React elements, while hopefully making it easier to scan.
MIT License
90 stars 5 forks source link

Why the default prefix? #2

Closed mingan closed 9 years ago

mingan commented 9 years ago

I was really happy to find this library and not having to write my own code since we use BEM quite a lot. One thing that bugs me is the default c- prefix.

I've never felt the need for prefixing. I'm aware that BEM used to differentiate between specific blocks b- and includes i- but I can't find any information about it in the current version. What is the rationale behind the default prefixing?

Personally, I wrap the helper class in a function which clears the prefix for me.

marcohamersma commented 9 years ago

Hey @Mingan, For some reason I missed this issue. For whatever it's worth, it was mostly just a convention I was used to from past work.

You're not the first person who's asked me this recently. I've thought about it and also don't really see a reason to use a default prefix anymore. I'm planning on releasing a new version the next few days which removes this prefix. I'll let you know when it's out.

mingan commented 9 years ago

Excellent! Thanks for the info. :+1:

marcohamersma commented 9 years ago

Hey @Mingan, just released a new version which removes the prefix, hope that works.

mingan commented 9 years ago

Updated, works perfectly!