DEV Community

TarcĂ­sio Giroldo
TarcĂ­sio Giroldo

Posted on

💅🏻CSS-in-JS is Making a Comeback: What’s New?

So, it looks like we are changing the direction of how we write CSS.

At first, I didn't like writing CSS-in-JS. It seemed unnecessary, but then I had a job where they only used styled-components, and I guess I adapted.

I didn't understand why we needed a library to write CSS when we could just use stylesheets directly or something like Tailwind CSS. But now that I’m a more experienced developer (I think), I kind of get why people love these libraries so much.

JavaScript frameworks are always changing direction from time to time, and now with React Server Components and React 19 supporting style hoisting, it feels like we’re heading into a new era. React 19 introduces new features that handle <script> and <style> tags inside components more intelligently, moving them to the document's head based on their precedence. This works seamlessly with concurrent rendering on the client and streaming rendering on the server, marking a significant shift in how we manage styles and scripts.

Some of these cool libraries are really embracing this change:


Inspiration

This article was crafted and tailored with ChatGPT help. 🤖💡

Top comments (0)