Tailwind-Merge Solves 3 Big Problems & Mistakes in Tailwind CSS

  Рет қаралды 12,220

ByteGrad

ByteGrad

Күн бұрын

Пікірлер: 16
@ByteGrad
@ByteGrad 5 ай бұрын
👉 NEW React & Next.js Course: bytegrad.com/courses/professional-react-nextjs
@3boodon
@3boodon 11 ай бұрын
This is literally a life saver package .. thanks for sharing ❤
@AlexSmith-ms9xb
@AlexSmith-ms9xb Жыл бұрын
Excited about the complete reusable button component video. When does it lands?
@ByteGrad
@ByteGrad Жыл бұрын
Working on it 😉
@michaelgerullis4300
@michaelgerullis4300 9 ай бұрын
a lot of the necessity for thins seems to come from the fact that people often forget to "actually" render just the right classnames when needed. instead of this: className={`bg-white px-4 py-2 ${someVar ? 'bg-black' : '' }`} do this: className={`px-4 py-2 ${someVar ? 'bg-black' : 'bg-white' }`} This is very simplified ofc, just illustrating
@이상현-s1p
@이상현-s1p Жыл бұрын
9:32 dynamic class is not working when restart project(npm run dev). tailwind do not leave class. / code sample className={twMerge(`mobile:${gnbActive ? "flex" : "hidden"}`)} please check up this.
@SaiponathGames
@SaiponathGames Жыл бұрын
How does this tailwind add the bg-grey-500? Because you said it uses regex?
@mariavillen5237
@mariavillen5237 Жыл бұрын
I am done with tailwind. I have to use custom components. Well, twMerge do not recognize custom components of tailwind config, so if you want to use twmerge, you have to repeat all your custom classes configuation in twmerge config. And it has bugs, like twmerge("w-96", "w-full") is not working.
@ByteGrad
@ByteGrad Жыл бұрын
W-full will override w-96
@mariavillen5237
@mariavillen5237 Жыл бұрын
@@ByteGrad well I am maybe doing something really wrong because it is not overwriting it. I have the 2 classes and w-full is strikethrough. I saw the git discussions. There was a similar bug with w-fit and w-full. By the way, your content is awesome!
@sibanzboss6705
@sibanzboss6705 Жыл бұрын
how can i pass a children
@ByteGrad
@ByteGrad Жыл бұрын
Good question, I’ll have a complete reusable button component video soon
@sibanzboss6705
@sibanzboss6705 Жыл бұрын
@@ByteGrad thanks, i'll be waiting for that
@CoIdestMoments
@CoIdestMoments Жыл бұрын
First big mistake is using Tailwind, it always end up with JS inline styles or finally creating and importing a .css file
@jvsvogler
@jvsvogler Жыл бұрын
It's much faster to write using Tailwind's utility classes than inline JS, but also it makes your spacing, sizes, etc much more consistent and easier to work with. Having the styles on the same file as the component also makes it a lot easier to figure out what is going on so you don't have to back and forth between files, so yeah, using Tailwind is definitely NOT a mistake.
@PanosPitsi
@PanosPitsi Жыл бұрын
noobs when a library offers utility classes 😡😡😡😡
cn() - Every Tailwind Coder Needs It (clsx + twMerge)
7:46
ByteGrad
Рет қаралды 132 М.
Responding To The Tailwind Conspiracy
37:25
Theo - t3․gg
Рет қаралды 79 М.
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 39 МЛН
Yay, My Dad Is a Vending Machine! 🛍️😆 #funny #prank #comedy
00:17
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 186 МЛН
The Advanced TailwindCSS Crash Course
37:39
Tom Is Loading
Рет қаралды 16 М.
10 Tailwind Classes I Wish I Knew Earlier
13:31
Web Dev Simplified
Рет қаралды 192 М.
Tailwind-Merge Is Incredibly Useful - And Here's Why!
12:58
simonswiss
Рет қаралды 37 М.
Why use Type and not Interface in TypeScript
14:12
ByteGrad
Рет қаралды 212 М.
Using CSS custom properties like this is a waste
16:12
Kevin Powell
Рет қаралды 177 М.
How the PROS Use Tailwind
9:55
Frontend FYI – by Jeroen
Рет қаралды 54 М.
TypeScript Generics are EASY once you know this
22:21
ByteGrad
Рет қаралды 141 М.
I WISH I Knew These Tailwind Tips Earlier
9:15
Theo - t3․gg
Рет қаралды 194 М.
Web Developer Roadmap (2024) - Everything is Changing
25:02
ByteGrad
Рет қаралды 405 М.