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
React の色々な スタイリング方法
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ユウト
June 03, 2022
Programming
74
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React の色々な スタイリング方法
ユウト
June 03, 2022
More Decks by ユウト
See All by ユウト
Rust製JavaScript EngineのTypeScriptサポート
yossydev
1
510
Rust製JavaScriptエンジンのTypedArray built-inメ ソッドの最適化
yossydev
0
170
Introduction to React Compiler
yossydev
0
160
Fast JSX: Don't clone props object #28768
yossydev
1
700
Core Web Vitalsについて
yossydev
0
150
Other Decks in Programming
See All in Programming
What's New in Android 2026
veronikapj
0
270
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
3
1.2k
Dockerfile CMD for Node.js
grazie1999
0
110
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
180
Built Our Own Background Agent at LayerX
layerx
PRO
10
5.9k
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
260
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
270
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
7k
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
1
150
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
350
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
280
VibeCodingからAgenticWorkflowへ
starfish719
0
730
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
24k
The SEO identity crisis: Don't let AI make you average
varn
0
530
Mobile First: as difficult as doing things right
swwweet
225
10k
How to build a perfect <img>
jonoalderson
1
5.9k
Prompt Engineering for Job Search
mfonobong
0
410
We Have a Design System, Now What?
morganepeng
55
8.3k
Embracing the Ebb and Flow
colly
88
5.1k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
450
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
660
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Transcript
React の色々な スタイリング方法 ユウト@20歳
色々なスタイリング方法 - Inline Style - CSS modules - CSS in
JS - UIコンポーネント - Tailwind CSS
Inline Styles - パッとスタイル当てたい時に使 う - 基本的に使うのはNG❌ - 擬似クラスやメディアクエリにも 対応していない
- 公式がそもそもCSSクラスを 使うように推奨
CSS Modules - パフォーマンスは必要なCSSだけ 読み込むので最高 - ただ最近のプロジェクトで使われる ことはほぼない - ファイルの肥大化
- 後述する他のスタイリング方法の方が はるかに描きやすい
CSS in JS - JSファイルの中にそのまま書ける - ロジックとスタイリングを同じ ファイルに書ける - パフォーマンスは悪くなる
- 命名を考える手間がある - 個人的にはCSS知っていれば学習 コストはほぼゼロなので、おすすめ
UIコンポーネント - 便利なコンポーネントがたくさんあるやつ - よく見るやつだけど、自分で作ろうとしたらめ んどくさいものが結構ある (Pagenation, Loading) - 最近ではUIコンポーネント
+ CSS in JS or Tailwind CSS がベター - UIコンポーネントはMUI,Chakra UI,Mantine がありますが、間違ってもMUIは使わないよ うにしましょう
Tailwind CSS - 神 - Inline Stylesのサクッとその場で書ける強さがある - CSS in
JSの、ロジックとスタイルを同じファイルに かける強さも持ってる - 命名不要 - 慣れると爆速でかける - Tailwind CSS用の書き方は覚えないといけない - レビューする人はちょっと大変