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の再レンダリングを理解する / Understanding React Re-ren...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
44aki
October 10, 2024
61
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Reactの再レンダリングを理解する / Understanding React Re-rendering
44aki
October 10, 2024
More Decks by 44aki
See All by 44aki
個人開発でDevinに20ドル課金してみた / Devin starting at $20
44aki
0
63
Hotwire入門 Part1 / Introduction to Hotwire Part 1
44aki
0
63
Dev Containerを使ってみよう / Let's try Dev Container!
44aki
0
39
プロダクト開発における振り返り手法 / Reflection Methods in Product Development
44aki
0
59
プロダクト開発におけるエンジニアリングマネージャー(EM)の役割 / Role of the Engineering Manager in Product Development
44aki
0
110
MVP開発とWhy,What,Howの考え方 / MVP Development and the why, what, how concept
44aki
0
170
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
520
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
660
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
Building Flexible Design Systems
yeseniaperezcruz
330
41k
The Pragmatic Product Professional
lauravandoore
37
7.4k
How to Ace a Technical Interview
jacobian
281
24k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Navigating Weather and Climate Data
rabernat
0
520
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.9k
Transcript
Reactの再レンダリングを理解する Understanding React Re-rendering
Reactには2種類のレンダリングがある 初回レンダリング E コンポーネントが最初に画面に表示されるタイミングで発生 再レンダリング E 既に表示されているコンポーネントが更新されたタイミングで発v E 今回のLTで話したいテーマはこちら
Component1 の count が更新された時に 再レンダリングされるコンポーネントはどれ Á ComponentÅ Á Component Á
Component3 再レンダリングに関するクイズ
Component1 の count が更新された時に 再レンダリングされるコンポーネントはどれ Á ComponentÅ Á Component Á
Component3 正解: 全部 親コンポーネントの state が更新されると 親コンポーネント以下は全て再レンダリングされる 再レンダリングに関するクイズ
state 管理を子コンポーネントで行うことで 再レンダリングの範囲を最小限にできる state管理はなるべく子コンポーネントで行う
memo 化したコンポーネントは props の値が 変わらない限りは前回の描画結果をキャッシュする memo化で再描画を抑えることも可能
useStat9 6 主に狭い範囲のスコープでの state 管理に使& 6 親、子、孫コンポーネント間の値の受け渡しで props リレーが発生しがÇ 6
props リレーをしたコンポーネント配下全てで再描画が発生 useContex 6 同一画面内での state 管理など広い範囲のスコープでの state 管理に使& 6 useContext で state を取得できるため props リレーが不h 6 stateが更新された際に context 配下全てで再レンダリングされる点は useState と同じ Redux、Recoilなどのライブラリを使Ô 6 アプリケーション全体の state 管理や useContext の代替として使& 6 React の管理外で state 管理を行い、孫コンポーネントが直接 state を取得できるため props リレーが不h 6 再レンダリングが発生するのは state を取得したコンポーネント配下のみ その他のstate管理を紹介
再レンダリングを理解して アプリケーションを高速化しよう