Mental Model for Ref Callbacks

Published: 07 February 2024
on channel: UI Engineering
819
71

Why do we need Ref Callbacks in React?

⏱️Timestamps:
00:00 - RefObject vs RefCallback
00:58 - When useEffect might not work
02:56 - Why using effect is a wrong tool for DOM Logic synchronization
04:06 - Fixing referential stability for Ref Callbacks
06:28 - Cleanup Functions for Ref Callbacks

📖 Acknowledgments and further reading:
Ref Callbacks Cleanup Function:
Merged RFC: https://github.com/facebook/react/pul...
When it will be published: https://github.com/facebook/react/iss...

Other:
https://legacy.reactjs.org/docs/refs-...
https://legacy.reactjs.org/docs/refs-...
https://react.dev/reference/react/use...
https://legacy.reactjs.org/docs/hooks...
https://tkdodo.eu/blog/avoiding-use-e...
https://julesblom.com/writing/ref-cal...
https://thoughtspile.github.io/2021/0...
  / usecallback-might-be-what-you-meant-by-use...  
https://blog.maisie.ink/react-ref-aut...


On this page of the site you can watch the video online Mental Model for Ref Callbacks with a duration of hours minute second in good quality, which was uploaded by the user UI Engineering 07 February 2024, share the link with friends and acquaintances, this video has already been watched 819 times on youtube and it was liked by 71 viewers. Enjoy your viewing!