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
730
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
480
これまでのReact、これからのReact
honda
0
340
Gatsbyお試し
honda
0
140
Web ComponentsとAngular
honda
0
160
Atomic Design周りについての私見
honda
1
800
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
890
Web Componentsの動向とPolymer
honda
4
2.8k
Other Decks in Programming
See All in Programming
AIエージェントで 変わるAndroid開発環境
takahirom
1
310
act1-costs.pdf
sumedhbala
0
160
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
470
Creating Composable Callables in Contemporary C++
rollbear
0
190
AIで効率化できた業務・日常
ochtum
0
160
継続モナドとリアクティブプログラミング
yukikurage
2
240
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
460
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
130
霧の中の代数的エフェクト
funnyycat
1
130
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
210
スマートグラスで並列バイブコーディング
hyshu
0
280
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
720
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
220
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
620
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
250
From π to Pie charts
rasagy
0
230
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
340
Leo the Paperboy
mayatellez
8
1.9k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
460
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
180
Design in an AI World
tapps
1
260
Agile that works and the tools we love
rasmusluckow
331
22k
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 !!