Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
React ABC Questions
Search
Hirotomo Yamada
April 18, 2025
Technology
0
860
React ABC Questions
Hirotomo Yamada
April 18, 2025
Tweet
Share
More Decks by Hirotomo Yamada
See All by Hirotomo Yamada
Release Yamada UI v2
hirotomoyamada
0
450
Other Decks in Technology
See All in Technology
AI駆動開発の実践とその未来
eltociear
1
270
【U/day Tokyo 2025】Cygames流 最新スマートフォンゲームの技術設計 〜『Shadowverse: Worlds Beyond』におけるアーキテクチャ再設計の挑戦~
cygames
PRO
2
780
Lessons from Migrating to OpenSearch: Shard Design, Log Ingestion, and UI Decisions
sansantech
PRO
1
150
初めてのDatabricks AI/BI Genie
taka_aki
0
210
Amazon Quick Suite で始める手軽な AI エージェント
shimy
0
510
AWS Security Agentの紹介/introducing-aws-security-agent
tomoki10
0
320
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
7
760
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
850
Reinforcement Fine-tuning 基礎〜実践まで
ch6noota
0
190
Snowflakeでデータ基盤を もう一度作り直すなら / rebuilding-data-platform-with-snowflake
pei0804
6
1.6k
AI時代の新規LLMプロダクト開発: Findy Insightsを3ヶ月で立ち上げた舞台裏と振り返り
dakuon
0
220
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
3
590
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
980
The SEO Collaboration Effect
kristinabergwall1
0
300
We Are The Robots
honzajavorek
0
110
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
200
Large-scale JavaScript Application Architecture
addyosmani
515
110k
[SF Ruby Conf 2025] Rails X
palkan
0
540
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
85
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
180
Design in an AI World
tapps
0
90
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
286
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
28
Transcript
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 リポジトリ