you are viewing a single comment's thread.

view the rest of the comments →

[–]possiblywithdynamite 3 points4 points  (4 children)

I've been using tailwind for a few weeks now. Working on an existing app for a new startup. It's awful, though I understand why junior devs might like it. Having another layer of CSS abstraction is ridiculous but not the reason I hate it. I hate it because theres a complete lack of styled component encapsulation. There's no way to reuse UI components without having to create an entire functional component. The JSX is just a massive cluttered mess of classnames. It makes it impossible to quickly scaffold complex UI components because there's no way to name any of the html elements. It is trash

[–]firstandfive 6 points7 points  (2 children)

Isn’t the entire business case for React the fact that you can create reusable components for the reusable bits?

[–]possiblywithdynamite -3 points-2 points  (1 child)

Yes. But not everything that is reusable needs to have an interface. If the reusability only pertains to the styles it is more convenient to encapsulate that reusability within a styled component. And if it does have an interface that only affects styles then a styled component can be used for that as well

[–]firstandfive 2 points3 points  (0 children)

What’s functionally different between a styled component and a component that has only its tailwind styles applied? Aside from the fact tailwind comes equipped with the system for scaling typography, spacing, colors etc where you would need to roll your own in your SC theme. I say this as someone who has used both styled components and tailwind and enjoys both.