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
670
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.2k
TypeScriptの型表現
honda
10
3k
Web Componentsの今
honda
1
420
これまでのReact、これからのReact
honda
0
300
Gatsbyお試し
honda
0
110
Web ComponentsとAngular
honda
0
130
Atomic Design周りについての私見
honda
1
680
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
800
Web Componentsの動向とPolymer
honda
4
2.5k
Other Decks in Programming
See All in Programming
REALITY コマンド作成チュートリアル
nishiuriraku
0
120
マイコンでもRustのtestがしたい/KernelVM Kansai 11
tnishinaga
1
880
SwiftDataのカスタムデータストアを試してみた
1mash0
0
150
実践Webフロントパフォーマンスチューニング
cp20
45
10k
CursorとDevinが仲間!?AI駆動で新規プロダクト開発に挑んだ3ヶ月を振り返る / A Story of New Product Development with Cursor and Devin
rkaga
2
700
AIコーディングの理想と現実
tomohisa
37
40k
파급효과: From AI to Android Development
l2hyunwoo
0
160
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
860
監視 やばい
syossan27
12
10k
20250426 GDGoC 合同新歓 - GDGoC のススメ
getty708
0
110
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
160
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
8
3.4k
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
A better future with KSS
kneath
239
17k
Gamification - CAS2011
davidbonilla
81
5.3k
The Cost Of JavaScript in 2023
addyosmani
49
7.8k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Into the Great Unknown - MozCon
thekraken
38
1.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
What's in a price? How to price your products and services
michaelherold
245
12k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
A Tale of Four Properties
chriscoyier
159
23k
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 !!