DEV Community

Discussion on: My secret trick for writing great React components

 
muhsarip profile image
muhsarip

too many class inside single element, make use of tailwind is harder to read.

Thread Thread
 
victorocna profile image
Victor Ocnarescu

You are perfectly right, Tailwind did not invent anything new and Tachyons did this years ago. In my personal experience I prefer Tailwind over Tachyons because class names have better names for the first one.

Take f5-l which for Tachyons means font-size: 1rem.
Tailwind has font-base which means the same thing.

Thread Thread
 
victorocna profile image
Victor Ocnarescu • Edited

I also love the fact that I do not have to come up with names for classes. In the old days I would say container or container-header, now I just add utility classes like flex flex-col gap-2 and everyone in my team understands the CSS behind it.