Loading video player...
Get $50 in free credits with Sevalla ā https://sevalla.com/?utm_source=cosden&utm_medium=Referral&utm_campaign=youtube š» Cosden Code ā https://cosdencode.ai š„ Import React (Newsletter) ā https://cosden.solutions/newsletter š Advanced Patterns React ā https://cosden.solutions/advanced-patterns-react š Project React ā https://cosden.solutions/project-react Join The Discord! ā https://discord.cosden.solutions VSCode Theme | Font ā Material Theme Darker | Menlo, Monaco "monospace" In this video, I'm going to show you a new hook from React 19.2 that finally fixes useEffect dependency arrays. useEffectEvent allows you to create a callback function that does not have to be provided in the dependency array of useEffect, yet will still see the latest values of what it uses. This is huge because it finally fixes one of the biggest problem that developers have had with useEffect dependency arrays. And it finally gives us an official stable solution from React to solve this problem!