Senior-Level Understanding of React Portals

preview_player
Показать описание
Understanding architectural layer of React Portals.
How declarative paradigm, unidirectional data flow and state colocation makes Portals great.

⏱️Timestamps:
00:00 - Classical Example
00:20 - Portals are not about CSS
00:33 - Popular workaround with Global Modal
00:40 - Architectural Layer of React Portals
00:58 - The Root Problem
01:22 - React's Declarative Paradigm
01:39 - Hidden cost of Declarative Paradigm (vs imperative)
02:16 - Issues with Global Modal
03:16 - Tight Coupling
03:48 - What React does when we setState?
04:15 - Colocation
04:44 - The Power of React Portals
05:03 - Ref Forwarding
Рекомендации по теме
Комментарии
Автор

Thanks for putting what I always argue about into such a short video that uses… well, proper words. I was always about globally state-managed modals to my colleagues. Now I will send this to anyone who (doesn't…) ask :D

HerrSiering
Автор

Great video, I'd love for a deep dive on some react patterns like compound components

Cahnisama
Автор

Świetny materiał, pytanie: czego używasz do animacji i wizualizacji?

ryderzero
Автор

Good video. Very informative. As a React dev though, I disagree with the idea that React's declarative paradigm "simplifies frontend work" especially after you demonstrate an imperative solution that doesn't need "Star Trek technology". It feels to me like Portals are yet another attempt at fixing React's limitations.

netssrmrz