Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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

35,970 Aufrufe • vor 1 Jahr •via X (Twitter)

10 Kommentare

Profilbild von IroncladDev
IroncladDevvor 1 Jahr

maybe just don't use tailwind at all

Profilbild von Page to Pixel Publishing
Page to Pixel Publishingvor 2 Jahren

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!

Profilbild von simeonGriggs
simeonGriggsvor 1 Jahr

Yep, my favorite way to do it

Profilbild von Navicstein Chinemerem
Navicstein Chinemeremvor 1 Jahr

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

Profilbild von Gokuljs
Gokuljsvor 1 Jahr

Why do i the feeling clsx is still better

Profilbild von Ömer Ayhan
Ömer Ayhanvor 1 Jahr

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

Profilbild von Taz
Tazvor 1 Jahr

Nice

Profilbild von Paweł Błaszczyk
Paweł Błaszczykvor 1 Jahr

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 😄

Profilbild von Pedro Martins
Pedro Martinsvor 1 Jahr

The correct way IMO

Profilbild von Mohamad Jahani
Mohamad Jahanivor 1 Jahr

YDKCLSX.

Ähnliche 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 Aufrufe • vor 1 Jahr