Hacker News new | ask | show | jobs
by peer2pay 784 days ago
Sorry for being pedantic but that’s not components that’s just global classes. Bootstrap anyone?
4 comments

Nobody said that Tailwind is something super special and there's only one way to do this. I find it nicer than hand-writing global classes. YMMV.

My point is just that "If I want five buttons to change, I have to go find five places to edit it" isn't the reality of working with the tool in its intended way.

[deleted]
The idea is similar, but a component contains markup and logic on top of the styles.

The approach Tailwind takes is that since the component is named and contained, its elements don't have to be named explicitly. And while we could then use inline CSS, it has some limitations so utility classes are a more powerful tool.

No, literal React (or Vue or Svelte) Components. Not like making global classes.
Harder to use and maintain then tailwind.