Goodbye, forwardRef

  Рет қаралды 5,424

UI Engineering

UI Engineering

Күн бұрын

Goodbye, forwardRef - The drama in 5 acts.
(reuploaded, audio sync fixed)
📖 Resources:
Docs:
- react.dev/reference/react/for...
- legacy.reactjs.org/docs/forwa...
RFCs:
- github.com/reactjs/rfcs/blob/...
- github.com/reactjs/rfcs/pull/...
- github.com/facebook/react/iss...
GitHub Discussions:
- github.com/facebook/react/iss...
- github.com/facebook/react/iss...
Other:
- fettblog.eu/typescript-react-...
🐦 Tweets:
- / 1230843448057569285
- / 1683414495291486208
- / 1747760712464613834
- / 1718507694443704803
- / 1672305484718800896
- / 1719496241501847884
- / 1635250148208164864
⏱️Timestamps:
00:00 - Intro
00:31 - Act I - Why do we need forwardRef?
01:35 - Act II - 7 issues with forwardRef
01:54 - Issue #1 - It doesn't support multiple refs
02:36 - Issue #2 - Component can loose it's displayName
03:09 - Issue #3 - It's basically a boilerplate
03:30 - Issue #4 - It can be a naming anti-pattern
04:14 - Issue #5 - Complicated TypeScript Issues
05:23 - Issue #6 - Potential Performance Issues
05:52 - Issue #7 - Not supported below React 16.3
06:16 - Act III - The Alternative
08:19 - Act IV - Remaining 5% of cases
10:17 - Act V - Why forwardRef was added to React?
13:18 - RFC to remove forwardRef
14:24 - Why blocking ref forwarding was a mistake

Пікірлер: 19
@meowmix0008
@meowmix0008 Ай бұрын
High quality research, point of view, and video! Please keep making content!
@thisweekinreact
@thisweekinreact 3 ай бұрын
Great video, I forgot a bit about the historical context of all this over time 😅 Shared in this week's newsletter 👍
@UIEngineering
@UIEngineering 3 ай бұрын
Yup, the evolution of some of those APIs is interesting when you look at it retrospectively 😄 Thank you very much! I'm an avid reader of This Week in React myself, so it's a huge honor for me to be mentioned, appreciate it!🤩
@merotuts9819
@merotuts9819 5 ай бұрын
Such a detailed..and well-researched video. Well done 👏 Instantly liked & subbed 👍
@UIEngineering
@UIEngineering 5 ай бұрын
I did write and rewrite the script for this video at least 5 times. So glad you liked it! Welcome onboard! 😊
@gerardmarquinarubio9492
@gerardmarquinarubio9492 5 ай бұрын
Hey commenting again here! Thanks for fixing the audio desync.
@UIEngineering
@UIEngineering 5 ай бұрын
Thanks for letting me know! My bluetooth headphones had a delay and tricked me 🙈
@Cahnisama
@Cahnisama 3 ай бұрын
This video was amazing, thank you so much
@UIEngineering
@UIEngineering 3 ай бұрын
Thank you! ❤ It means a lot, and new videos are coming! ☺
@RamaRama-qv3jo
@RamaRama-qv3jo 4 ай бұрын
That's great! I tried this pattern with the component of the Ionic framework, everything works great.)) Thanks!
@UIEngineering
@UIEngineering 3 ай бұрын
Glad I could help! I think having this in your toolbelt definitely helps 🙂
@the-other-sunny
@the-other-sunny 5 ай бұрын
Liking again !
@UIEngineering
@UIEngineering 5 ай бұрын
Unfortunately reuploading totally killed this video's reach, so thank you for support! Appreciate it very much! ❤️
@Daddyjs
@Daddyjs 2 ай бұрын
Can you just pass ref to a functional compojent and call the prop something other than ref ? Like so instead of calling the prop name ref. This way you can pass it as a prop
@UIEngineering
@UIEngineering 2 ай бұрын
That's exactly the idea of what I've called "Custom Ref Prop Pattern" (06:16 - The Alternative). Exactly what you've described 👍
@dailydose7772
@dailydose7772 3 ай бұрын
Dam boy! Imagine if at an interview they asked you "what do you know about ref". Instant hire. Great content.
@UIEngineering
@UIEngineering 2 ай бұрын
Thank you! 🤩 Appreciate it!
Why 95% of Modals should be Local (in React)
10:01
UI Engineering
Рет қаралды 11 М.
Are You In A React Cult?
13:27
Jack Herrington
Рет қаралды 29 М.
HOW DID HE WIN? 😱
00:33
Topper Guild
Рет қаралды 30 МЛН
You might not need useEffect() ...
21:45
Academind
Рет қаралды 152 М.
Never Forget React forwardRef Again
9:33
Coding in Public
Рет қаралды 14 М.
Next.js Auth Tutorial with RSCs and Server Actions
14:45
WorkOS
Рет қаралды 3,5 М.
"Stop Using Async Await in .NET to Save Threads" | Code Cop #018
14:05
Finally Fix Your Issues With JS/React Memory Management 😤
20:13
Jack Herrington
Рет қаралды 82 М.
Самые загадочные хуки - useImperativeHandle и forwardRef
9:42
Веб-разработка - DevMagazine
Рет қаралды 8 М.
Why didn't the Angular team just use RxJS instead of Signals?
8:15
Joshua Morony
Рет қаралды 88 М.
React Compiler: In-Depth Beyond React Conf 2024
15:16
Jack Herrington
Рет қаралды 74 М.
HOW DID HE WIN? 😱
00:33
Topper Guild
Рет қаралды 30 МЛН