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 ABC Questions
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hirotomo Yamada
April 18, 2025
Technology
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React ABC Questions
Hirotomo Yamada
April 18, 2025
Transcript
13 slides
React ABC問題
Profile Produced Contributing Hirotomo Yamada Developer of Yamada UI. Designer,
design system and UI engineer. I work for
React ABC問題 A B C • 依存関係は、図の通りである。 • C内のアクション(onClick)で、Cを再レンダリングさ せずに、Bを再レンダリングさせよ。
• 問題の解決には、Reactが提供しているフックや APIのみ使用すること。但し、メモ化 (useMemo、 memoなど)は使用しないこと。 コンポーネント ツリー
React ABC問題 - ソースコード
React ABC問題 - 一般的なアプローチ A B C コンポーネント ツリー ステート
セッター ステート セッター ステート セッター • Aにステートとセッターを配置する。 • Bにステートを渡す。 • Cにセッターを渡す。
React ABC問題 - 期待通りにならない A B C コンポーネント ツリー ステート
セッター ステート セッター ステート セッター • Cのセッターを実行して、 Aのステートを更新する。 • しかし、Aのステートが変更されると子要素の Cま でも再レンダリングされてしまう。
React ABC問題 - 解決するアプローチ • • • Contextを使用する。 A B
C コンポーネント ツリー
React ABC問題 - Context
React ABC問題 - 解決するアプローチ • • • Contextを使用する。 useSyncExternalStoreを使用する。 A
B C コンポーネント ツリー
React ABC問題 - useSyncExternalStore
React ABC問題 - 解決するアプローチ • • • Contextを使用する。 useSyncExternalStoreを使用する。 useImperativeHandleを使用する。
A B C コンポーネント ツリー
React ABC問題 - useImperativeHandle
React ABC問題 - ありがとうございました https://github.com/hirotomoyamada/react-abc GitHub リポジトリ
More Decks by Hirotomo Yamada
See All by Hirotomo Yamada
Release Yamada UI v2
hirotomoyamada
0
720
Other Decks in Technology
See All in Technology
生成AIによる情報システムへのインパクト (2026年11月版)
taka_aki
0
140
AWS re:Invent 2026 FSI Pre-Event Networking Night
junjikoide
0
430
AIエージェントの認証がまとめて進化! ~pre:Inventで来た3つのアップデート~
minorun365
PRO
2
330
AI時代の開発組織における、QAの体制とロールの再設計
sansantech
PRO
0
200
社内アプリ基盤「Quartz」による、 非エンジニアとAIに本番デプロイを 任せても壊れないプラットフォームの設計
staka121
PRO
1
590
「正しいデータ」の定義をAI エージェントとつくるGoogleADKによるデータ品質定義の実践
takaha4k
0
170
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
3
200
AIフレンドリーなGenerative UIをJSXで
uhyo
3
1.2k
Ignite 2026 Security
babaneko
0
130
対話 AI プラットフォーム「アイブリー」で実践する自然言語処理と事業開発
ivry_presentationmaterials
0
260
一口馬主の募集馬をAIで診断してみた
yoshimura_datam
0
130
AWS AIB 受験体験記!~練習問題を AI に作らせてみて感じたこと~
ysuzuki
0
130
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.3k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
BBQ
matthewcrist
90
10k
Agile that works and the tools we love
rasmusluckow
331
22k
Docker and Python
trallard
47
4.3k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
400
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
540
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.8k
Why Our Code Smells
bkeepers
PRO
340
58k
Google's AI Overviews - The New Search
badams
0
1.7k
Code Reviewing Like a Champion
maltzj
529
40k