logoalt Hacker News

hamandcheeselast Saturday at 11:25 PM1 replyview on HN

> What if you need to copy a element with tailwind, this later gets altered to include a slightly different style, but wait, now you have a original somewhere else in your code base, that is missing those updates. So you require the discipline just like CSS to keep things up to date.

You solve these problems by creating abstractions in JavaScript (most likely react components), exactly the same way you'd solve any other sort of code duplication.

By using tailwind (or inline styles), you go from two system of abstraction (CSS, JavaScript) to one (just JavaScript).


Replies

yencabulatoryesterday at 7:16 PM

If you're using JS for any kind of "components", you can use JS for scoped CSS too.