DEV Community

loading...

Discussion on: Name a tech you recently tried, but wasn't fully a fan of?

Collapse
jmau111 profile image
Julien Maury

css-in-js libraries

Collapse
madza profile image
Madza Author • Edited

Just saved an article on it to explore the downsides more ;)

Collapse
sarneeh profile image
Jakub Sarnowski • Edited

Would love to hear the "why" answer 😃

Collapse
lamka02sk profile image
lamka02sk

Probably because it is unnecessary overhead and it has no additional value, but it is "fancy".

Thread Thread
sarneeh profile image
Jakub Sarnowski

Cannot disagree more 😃 Have you been working with these on a bigger-scale project? CSS-in-JS are a breeze in terms of development speed, code readability and maintenance, and are also a lot easier to optimize. Creating clean CSS, without much duplicate code and with some kind of organisation is a pretty hard task.

Also, when the - almost unnoticeable - overhead is a problem for you, you can always use some of the zero-runtime CSS-in-JS libraries.

Collapse
jmau111 profile image
Julien Maury

Here are 4 "why" :

  • don't really see what problem(s) they solve
  • demo codes (most of the time) are not convincing, not focusing on real use cases, so it's not something you can use to teach code and as a result it's more difficult to justify CSS-In-Js for big projects with money at stake
  • don't see a lot of best practices
  • when dealing with components, CSS Modules are much better imho (maintenance, readability)

So most of the time it consists in pretty cool features but there are better techniques that bring better results and solve more problems.

Would love to know your point of view on those specific points. I'm not pretending that I have all the answers but I've some experience (perso and pro) with these libraries.

Forem Open with the Forem app