Loading video...

Video Failed to Load

Go Home

Tailwind devs: You don't need clsx to toggle styles 👀

36,079 views • 1 year ago •via X (Twitter)

10 Comments

IroncladDev's profile picture
IroncladDev1 year ago

maybe just don't use tailwind at all

Page to Pixel Publishing's profile picture
Page to Pixel Publishing2 years ago

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!

simeonGriggs's profile picture
simeonGriggs1 year ago

Yep, my favorite way to do it

Navicstein Chinemerem's profile picture
Navicstein Chinemerem1 year ago

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

Gokuljs's profile picture
Gokuljs1 year ago

Why do i the feeling clsx is still better

Ömer Ayhan's profile picture
Ömer Ayhan1 year ago

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

Taz's profile picture
Taz1 year ago

Nice

Paweł Błaszczyk's profile picture
Paweł Błaszczyk1 year ago

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 😄

Pedro Martins's profile picture
Pedro Martins1 year ago

The correct way IMO

Mohamad Jahani's profile picture
Mohamad Jahani1 year ago

YDKCLSX.

Related Videos

Need to vent... don't listen if you don't want to
1:50

Sensitive content

Need to vent... don't listen if you don't want to

Secretgeek

18,051 views • 1 year ago