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
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
Transcript
15 slides
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 !!
More Decks by ponday
See All by ponday
関数型でGoFのデザインパターンやってみる
honda
1
1.7k
TypeScriptの型表現
honda
10
3.2k
Web Componentsの今
honda
1
490
これまでのReact、これからのReact
honda
0
350
Gatsbyお試し
honda
0
150
Web ComponentsとAngular
honda
0
170
Atomic Design周りについての私見
honda
1
830
え、まだWeb Componentsを未来の技術だと思ってるの?
honda
2
900
Web Componentsの動向とPolymer
honda
4
2.8k
Other Decks in Programming
See All in Programming
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
150
はじめてのPLATEAU
nokonoko1203
1
660
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
SODA - FACT BOOK(EN)
sodainc
1
270
Distance field of Julia set
kinakomoti321
0
330
Crash Auto Pipelines
veronikapj
1
440
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
620
GraphQL の onError と Nullability のこれから
quramy
0
220
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
650
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
150
AIコーディング時代のKotest ユニットテストから APIレベルの仕様固定化テストへ
ooga04
0
300
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
210
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
4 Signs Your Business is Dying
shpigford
187
23k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
540
Joys of Absence: A Defence of Solitary Play
codingconduct
1
580
Agile that works and the tools we love
rasmusluckow
331
22k
BBQ
matthewcrist
90
10k
KATA
mclloyd
PRO
35
16k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
580
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k