~/talk

CSS in React Server Components

Talkat React Paris 2024 · on Friday, 2024-03-22· [react, css]
slides:none on file

React Server Components break runtime CSS-in-JS patterns: styled-components and emotion rely on context and client-side effects to inject styles, so server components force many files to be marked use client, losing server benefits. A working registry + use server inserted HTML approach collects hashed classnames and injects style tags on SSR so hydration avoids FOUC, but it means refactoring large codebases — one real example has 5,500 styled instances. The viable long-term path is compile-time CSS (Linaria, Panda, Pigment, NextYak) which preserves styled APIs without runtime.

AI-written summary · about

  1. 0:00Introduction
  2. 2:24React evolution and challenges
  3. 5:15Styled components implementation
  4. 10:56Solving the CSS registry problem
  5. 13:33Understanding server components
  6. 18:20The server component incompatibility
  7. 23:51Future of CSS in React
  8. 30:13Conclusion and outlook
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.