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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
310
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
250
エラー処理の温故知新 / history of error handling technic
ryotanakaya
6
1.6k
Road to RubyKaigi: Play Hard(ware)
makicamel
1
470
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
110
NakouPAY説明用
annouim0
0
270
Back to the roots of date
jinroq
0
480
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
260
アーキテクチャモダナイゼーションとは何か
nwiizo
19
5.5k
Programming with a DJ Controller — not vibe coding
m_seki
3
250
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
230
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
4
1.2k
Featured
See All Featured
New Earth Scene 8
popppiees
3
2.1k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
440
BBQ
matthewcrist
89
10k
Exploring anti-patterns in Rails
aemeredith
3
330
How to Think Like a Performance Engineer
csswizardry
28
2.6k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
How to make the Groovebox
asonas
2
2.1k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
530
It's Worth the Effort
3n
188
29k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
My Coaching Mixtape
mlcsv
0
110
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 !!