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
0
710
styled-components or emotion?
React勉強会@福岡 vol.1(2019/01/25)の発表資料3つめです。
すごく簡易的な検証なのでいろいろなシーンで追加の検証をしていきたい。
ponday
January 25, 2019
Tweet
Share
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
330
Gatsbyお試し
honda
0
130
Web ComponentsとAngular
honda
0
150
Atomic Design周りについての私見
honda
1
780
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
880
Web Componentsの動向とPolymer
honda
4
2.7k
Other Decks in Programming
See All in Programming
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
130
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
650
Beyond the Basics: Signal Forms
manfredsteyer
PRO
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
190
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
510
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3k
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
220
Raku Raku Notion 20260128
hareyakayuruyaka
0
430
SourceGeneratorのマーカー属性問題について
htkym
0
110
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
120
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
500
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
Exploring anti-patterns in Rails
aemeredith
2
280
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
64
A Tale of Four Properties
chriscoyier
162
24k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
140
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
82
Designing for humans not robots
tammielis
254
26k
Typedesign – Prime Four
hannesfritz
42
3k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
140
Docker and Python
trallard
47
3.7k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
200
WENDY [Excerpt]
tessaabrams
9
36k
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 !!