DEV Community

TarcĂ­sio Giroldo
TarcĂ­sio Giroldo

Posted on

2 1 1 1 1

💅🏻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. 🤖💡

SurveyJS custom survey software

Build Your Own Forms without Manual Coding

SurveyJS UI libraries let you build a JSON-based form management system that integrates with any backend, giving you full control over your data with no user limits. Includes support for custom question types, skip logic, an integrated CSS editor, PDF export, real-time analytics, and more.

Learn more

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series đź“ş

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series đź‘€

Watch the Youtube series