Tailwind is messy. Make reusable components instead with ReactJS, TailwindCSS, & TypeScript

Опубликовано: 15 Октябрь 2023
на канале: Devistry
15,564
549

I love TailwindCSS, but it can create some very messy HTML code. You can make a massive improjevent by reusing your common elements as a component. This video shows you how you can build your own library of reusable components.

00:00 Intro
03:05 Creating a component
04:05 Using the children prop
05:50 Passing button attributes (onClick, etc)
10:18 Overriding styles with twMerge
14:45 Component variants with class-variance-authority
22:38 cn() utility function
24:10 Passing variant props
27:16 Outro


Смотрите видео Tailwind is messy. Make reusable components instead with ReactJS, TailwindCSS, & TypeScript онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Devistry 15 Октябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 15,564 раз и оно понравилось 549 людям.