Загрузка видео...

Не удалось загрузить видео

На главную

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

35,970 просмотров • 1 год назад •via X (Twitter)

Комментарии: 10

Фото профиля IroncladDev
IroncladDev1 год назад

maybe just don't use tailwind at all

Фото профиля Page to Pixel Publishing
Page to Pixel Publishing2 лет назад

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
simeonGriggs1 год назад

Yep, my favorite way to do it

Фото профиля Navicstein Chinemerem
Navicstein Chinemerem1 год назад

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

Фото профиля Gokuljs
Gokuljs1 год назад

Why do i the feeling clsx is still better

Фото профиля Ömer Ayhan
Ömer Ayhan1 год назад

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

Фото профиля Taz
Taz1 год назад

Nice

Фото профиля Paweł Błaszczyk
Paweł Błaszczyk1 год назад

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
Pedro Martins1 год назад

The correct way IMO

Фото профиля Mohamad Jahani
Mohamad Jahani1 год назад

YDKCLSX.

Похожие видео