Loading video...

Video Failed to Load

Go Home

Tailwind devs: You don't need clsx to toggle styles ๐Ÿ‘€

35,970 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