<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/css-in-react-server-components-opbc3na6b" -->

---
title: CSS in React Server Components | daily.dev
description: React Server Components give us a new way to write server-exclusive code in React, but they have limitations and are not fully compatible with popular...
canonical: https://daily.dev/posts/css-in-react-server-components-opbc3na6b
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: CSS in React Server Components | daily.dev
og:description: React Server Components give us a new way to write server-exclusive code in React, but they have limitations and are not fully compatible with popular...
og:url: https://daily.dev/posts/css-in-react-server-components-opbc3na6b
og:image: https://api.daily.dev/og/posts/opBC3na6b.png
og:image:alt: CSS in React Server Components
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CSS in React Server Components

**[Josh W Comeau](https://daily.dev/sources/joshwcomeau)** · 27 min read · 13 upvotes · 1 comments

## Summary

React Server Components give us a new way to write server-exclusive code in React, but they have limitations and are not fully compatible with popular CSS-in-JS libraries. However, there are alternative CSS-in-JS libraries like Linaria and Pigment CSS that offer compatibility with React Server Components. Migrating from a styled-components application to a zero-runtime CSS-in-JS library may not be necessary unless there is a performance benefit or specific need for the new features.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.joshwcomeau.com/react/css-in-rsc/>

## Community discussion

Top comments from developers on daily.dev.

**@avizmarques** · 0 upvotes

> awesome content as always

---

Tags: [#react](https://daily.dev/tags/react), [#styled-components](https://daily.dev/tags/styled-components)

[View this post on daily.dev](https://daily.dev/posts/css-in-react-server-components-opbc3na6b)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"CSS in React Server Components","url":"https://daily.dev/posts/css-in-react-server-components-opbc3na6b","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/css-in-react-server-components-opbc3na6b"},"datePublished":"2024-04-15T15:46:09.838Z","dateModified":"2024-05-09T08:22:04.995Z","description":"React Server Components give us a new way to write server-exclusive code in React, but they have limitations and are not fully compatible with popular...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/74d2c5542fb650bec786cfa1a1074ad3?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/74d2c5542fb650bec786cfa1a1074ad3?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"Josh W Comeau","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Josh W Comeau","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/4a121572d03c40a2bff9e8ed0f0792b5","url":"https://daily.dev/sources/joshwcomeau"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/css-in-react-server-components-opbc3na6b","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":13},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"react,styled-components","timeRequired":"PT27M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Josh W Comeau","item":"https://daily.dev/sources/joshwcomeau"},{"@type":"ListItem","position":3,"name":"CSS in React Server Components"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/css-in-react-server-components-opbc3na6b","comment":[{"@type":"Comment","text":"awesome content as always","datePublished":"2024-04-19T13:22:08.737Z","url":"https://daily.dev/posts/opBC3na6b#c-TevmPFB5X","author":{"@type":"Person","name":"Alexandra Marques","url":"https://daily.dev/avizmarques","image":"https://lh3.googleusercontent.com/a/ACg8ocLheIgJ_1kDtPnIL8z07jfFTWB_IIBLYoGxWne5Aqtp5NY=s96-c"}}]}
```

