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
React の色々な スタイリング方法
Search
ユウト
June 03, 2022
Programming
76
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
600
Rust製JavaScriptエンジンのTypedArray built-inメ ソッドの最適化
yossydev
0
190
Introduction to React Compiler
yossydev
0
170
Fast JSX: Don't clone props object #28768
yossydev
1
720
Core Web Vitalsについて
yossydev
0
150
Other Decks in Programming
See All in Programming
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
120
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
180
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
570
iOSDCのペンライトを自動制御したい!
akkeylab
0
340
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
510
Are APIs Still Relevant in the AI Era?
soyuka
0
400
wkhtmltopdfの次どうするか問題2026
willnet
2
1.8k
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
260
Featured
See All Featured
We Are The Robots
honzajavorek
0
380
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.3k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
560
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
610
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
750
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
590
Designing for Timeless Needs
cassininazir
1
510
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用の書き方は覚えないといけない - レビューする人はちょっと大変