Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
styled-components or emotion?
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ponday
January 25, 2019
Programming
720
0
Share
styled-components or emotion?
React勉強会@福岡 vol.1(2019/01/25)の発表資料3つめです。
すごく簡易的な検証なのでいろいろなシーンで追加の検証をしていきたい。
ponday
January 25, 2019
More Decks by ponday
See All by ponday
関数型でGoFのデザインパターンやってみる
honda
1
1.6k
TypeScriptの型表現
honda
10
3.1k
Web Componentsの今
honda
1
470
これまでのReact、これからのReact
honda
0
340
Gatsbyお試し
honda
0
130
Web ComponentsとAngular
honda
0
150
Atomic Design周りについての私見
honda
1
790
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
880
Web Componentsの動向とPolymer
honda
4
2.7k
Other Decks in Programming
See All in Programming
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
500
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.6k
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
540
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
320
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.3k
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
260
Coding as Prompting Since 2025
ragingwind
0
730
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
540
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
230
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
240
アーキテクチャモダナイゼーションとは何か
nwiizo
15
4k
おれのAgentic Coding 2026/03
tsukasagr
1
130
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
170
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
190
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Unsuck your backbone
ammeep
672
58k
Optimizing for Happiness
mojombo
378
71k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Transcript
styled-components or emotion ? React勉強会@福岡 vol.1 / Jan 25th, 2019
ponday (@ponday_dev)
Profile - ponday (Honda, Yusuke) - 株式会社ベガコーポレーション エンジニア - Like
: TypeScript / Elixir / Python etc… - 日曜フロントエンドエンジニア - 副業もやってます
Reactでよく聞くCSS in JS
styled-components
emotion
で、 結局どっち使えばいいの?
styled-components vs emotion - styled-componentsのほうが人気っぽい - GitHubのstar数はstyled-componentsのほうが多い - emotionも伸びてきている -
emotionのほうが後発で高機能 - 開発はどちらもアクティブ - styled-components v4で速くなったらしい
検証してみた
速度検証 - スタイル付きのリスト(1万件)の表示速度を図る - componentWillMount 〜 componentDidMountまで - 10回平均 -
以下の3つのコードで検証 - styled-components - emotion (CSS style) - emotion (styled)
styled-components
emotion (CSS style)
emotion (styled)
結果 styled-components emotion (CSS style) emotion (styled) キャッシュなし キャッシュあり 762ms
1103ms 507ms 596ms 1033ms 421ms
検証 - @emotion/styledが速そう? - styled-componentsも実用レベル - 意外とemotion標準のオブジェクト型が遅い - 簡易的な検証なのでいろいろ試していきたい
Thank you !!