DEV Community

Discussion on: Optimizing React apps: Hardcore edition

Collapse
 
alvechy profile image
Alex Vechy

Why the very sole existance of clsx hurts me so much. classnames was already tiny popular package. Why would someone decide to develop own package instead. Now if you aim to use it (for whatever reason, 200b is literally nothing), your poor devs (current and the future ones) will have to spend some time going to the docs of clsx to check any API differences with classnames. If it's the same API – even more confusing. Why create a new Open Source package when you can contribute to already existing one?

Collapse
 
wojtekmaj profile image
Wojciech Maj

clsx is fully compatible with classnames. Yeah, I don't quite understand what was going on here - sometimes it's maintainers that are attached to their solutions and look down on some contributions fundamentally changing it. Anyways, here's where we are - we have two competing, popular packages doing the same thing and being mutually compatible - so my pick is the one that's both faster and smaller.