5 ms·
You lost me at ‘maintain’. It’s definitely not easier than just updating a single .button class, and I’m not going to create reusable components out of everyth
by pupppet 2y ago
You lost me at ‘maintain’. It’s definitely not easier than just updating a single .button class, and I’m not going to create reusable components out of everything in my project, the <Button /> approach doesn’t work for everything.
- compootr 2y agoYes, it is easier to maintain (assuming no css-in-js) Your styles are bound to the component, not some global in your app. States and their representations are controlled in the component themselves With normal css files and class names, you must jump between files. With tailwind, I see what's going on with a component right in my jawascript
- pupppet 2y agoYou’re assuming I’m going to create a component out of any element on the page that needs styling. In my project I could just have a small handful of these scattered across hundreds of files: <table class=“datatable”> If I used tailwind utility classes, how do I update my data table styling without having to search and replace across all of my files? Assuming you could even search and replace, the utility classes could be in a different order. Not saying it’s not doable, but it seems like a real pain in the ass. What am I missing?
- llamaimperative 2y agoThe things it doesn't work for are the things that .button doesn't work for either.