Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
styled-components or emotion?
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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.7k
TypeScriptの型表現
honda
10
3.2k
Web Componentsの今
honda
1
480
これまでのReact、これからのReact
honda
0
350
Gatsbyお試し
honda
0
150
Web ComponentsとAngular
honda
0
170
Atomic Design周りについての私見
honda
1
820
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
890
Web Componentsの動向とPolymer
honda
4
2.8k
Other Decks in Programming
See All in Programming
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
150
APNsからLive Activityを開始する話
yumnumm
0
180
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
[2026-10-09]一枚の布で作らなくてもいい。 信頼性は「パッチワーク」で紡がれる~既存の運用と新しい可能性をつなぎ合わせてきたCREの話~
tosite
0
110
残高管理から台帳サービスへの進化
artoy
1
220
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
190
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
290
オーケストレーション記述言語 Katari
yukikurage
0
200
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.8k
R8 の設定見直しでアプリサイズ削減
andpad
0
230
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
120
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
110
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
320
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Technical Leadership for Architectural Decision Making
baasie
3
610
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
420
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
610
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 !!