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
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
こんなに変わった! AWSネットワークの常識
shotashiratori
12
8.3k
思考過程から秘密が漏れる:Amazon Bedrock上のKimi K3を5つの方法で攻めたら、25回中22回漏洩した話
yama3133
1
170
「個社」ではなく「業界」の課題を解く AI 対話開発 ー 価値を広げる設計と、価値を守るエンジニアリング ー
ivry_presentationmaterials
2
130
Sonnetだけで業務はまわる?
kintotechdev
1
140
DevOps Agentにあらゆるセキュリティインシデントのトリアージを任せた件
jirtosterone
1
170
あの日、見つかっていなかったらどうなっていたか
kazzpapa3
2
240
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
13
6.5k
Del vibe coding a un Desarrollo (agéntico) fiable
jcabot
0
130
個人ASを取得して、自宅Kubernetes上のVMをグローバルIPで公開した話
munenick
0
140
業務の傍らで進める改善ループエンジニアリング
bengo4com
0
120
【Oracle AI SPOTLIGHT ウェビナー】【特別開催:日本語で解説!】Oracle AI World 2026 最新情報フィードバック
oracle4engineer
PRO
1
260
Go初心者のクラウドエンジニアが、デプロイを通して旨味を知っていく話
ryudai
1
230
Featured
See All Featured
Faster Mobile Websites
deanohume
310
32k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
480
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Mobile First: as difficult as doing things right
swwweet
225
10k
Producing Creativity
orderedlist
PRO
348
41k
Designing Powerful Visuals for Engaging Learning
tmiket
1
660
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
660
Leo the Paperboy
mayatellez
11
2.5k
Practical Orchestrator
shlominoach
192
12k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k