3 ms·
> "but nobody writes React like that" If it's "possible" people WILL write code like that. That's why I like styled-components, you are FORCED to separate the
by franciscop 4y ago
> "but nobody writes React like that"
If it's "possible" people WILL write code like that. That's why I like styled-components, you are FORCED to separate the style definition and then you can say nobody writes code like that. But dozens of style classes mixed with functionality? People DO write code like that, a lot more than I like admitting seeing myself.
- michaelteter 4y agoThis is why I have a hard time getting on the Tailwind bandwagon. It feels like a pipeline equivalent to "margin: 1px 0 0 4px;" and other element-specific stylings _everywhere_. CSS brought some opportunity for structure. At least it started out as "define a common style for a thing", and then if you really wanted to make a small deviation you could inherit and override something from the class. Could be that since I'm not a frontender I just don't get it, but to me it feels like "global variables everywhere".
- robswc 4y agoAs a full stack that is mostly backend, I like the way CSS frameworks allow me to not have to worry too much about design. I originally used CSS "properly" but I found that it was a chore/pain basically recreating these CSS frameworks over and over. It can get messy pretty fast but I find once you sorta get a handle on the frameworks, it becomes easy to parse as long as people aren't doing 10+ classes per element. I've found working without a CSS framework, people will tend to re-invent the wheel 100 times. i.e. I've seen "padded-box" and "box-with-padding" classes. I experience the worst of the worst tho, as I do a lot of refactoring work, so my take is a bit bias haha.