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
680
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
310
Gatsbyお試し
honda
0
110
Web ComponentsとAngular
honda
0
130
Atomic Design周りについての私見
honda
1
690
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
810
Web Componentsの動向とPolymer
honda
4
2.5k
Other Decks in Programming
See All in Programming
Design Pressure
hynek
0
1.4k
Perlで痩せる
yuukis
1
650
Babylon.js 8.0のアプデ情報を 軽率にキャッチアップ / catch-up-babylonjs-8
drumath2237
0
110
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
5
920
マテリアルって何者?RealityKitで扱うマテリアル入門
nao_randd
0
140
抽象データ型について学んだ
ryounasso
0
200
CQRS/ESのクラスとシステムフロー ~ RailsでフルスクラッチでCQRSESを組んで みたことから得た学び~
suzukimar
0
190
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
1
160
JSAI2025 RecSysChallenge2024 優勝報告
unonao
1
370
Doma で目指す ORM 最適解
nakamura_to
1
160
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
130
バリデーションライブラリ徹底比較
nayuta999999
1
410
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
42
2.3k
The Cost Of JavaScript in 2023
addyosmani
49
8k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to train your dragon (web standard)
notwaldorf
92
6k
Designing for Performance
lara
608
69k
Documentation Writing (for coders)
carmenintech
71
4.8k
Raft: Consensus for Rubyists
vanstee
137
7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Rails Girls Zürich Keynote
gr2m
94
13k
Embracing the Ebb and Flow
colly
85
4.7k
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 !!