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
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
Explore CoroutineScope
tomoeng11
0
180
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
160
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
110
AI-DLC Deep Dive
yuukiyo
9
5.7k
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.7k
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
500
Road to RubyKaigi: Play Hard(ware)
makicamel
1
560
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
150
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
4.9k
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
110
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
22
12k
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
450
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Context Engineering - Making Every Token Count
addyosmani
9
870
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
290
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.4k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
360
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
260
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
510
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 !!