Video yükleniyor...
Video Yüklenemedi
Tailwind devs: You don't need clsx to toggle styles 👀
35,970 görüntüleme • 1 yıl önce •via X (Twitter)
10 Yorum

maybe just don't use tailwind at all

Boost, surf, and weave your way through The Art of Flight, an arcade game about flying multiple ships at the same time. With solo, local co-op, and a leaderboard, there are tons of ways to play. Wishlist on Steam today!

Yep, my favorite way to do it

Now you have two problems, clsx works fine and you can use plain objects instead of nested tenarry

Why do i the feeling clsx is still better

We can use objects within clsx. I think that helps dealing clutters

Nice

I think that depends - if you’re using JS to set the attribute anyway (it’s not some built in state) why not use JS to update classes and have smaller stylesheet with more performant classes and less risk of styles collision? But you must avoid twMerge for this to make sense 😄

The correct way IMO

YDKCLSX.
Benzer Videolar
Sensitive content
Need to vent... don't listen if you don't want to
Secretgeek
18,051 görüntüleme • 1 yıl önce

