~/talk

CSS in JS: Is it worth the hype

Talkat JSUnconf 2019 · 2019-04-13..04-14· [css, javascript]
slides:none on file

Styled-components inlines critical CSS to avoid render blocking but Webpack can produce the same effect; a test with four button variants measures 3.4s vs 3.5s vs 3.6s to first meaningful paint while scripting time grows substantially for CSS-in-JS. Collocated styles balloon component files, lack source maps and produce unreadable class names unless Babel plugins add meaningful prefixes or CSS namespaces. Props enable dynamic styles but require complex JS conditionals so props are dangerous; atomic design, BEM or a HOC-to-BEM approach keeps things debuggable and lets components share logic with React Native.

AI-written summary · about

  1. 0:00Start
  2. 1:21The Motto of the High Royal Society
  3. 4:46Style Components
  4. 10:22Collocation Scheme
  5. 15:04Atomic Design
  6. 16:01Scoping
  7. 26:00Higher-Order Component
  8. 26:49Define Prop Types and Default Props
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.