MENU

Fun & Interesting

Mastering React's useEffect

Jack Herrington 178,074 3 years ago
Video Not Working? Fix It Now

It's easier to write code that makes React's useEffect hook go off the rails than it is to write code that uses it the right way. Let's develop some strategies that you can use to make sure the useEffects you write always work when and how you expect them to work. Code: https://github.com/jherr/taming-useeffect 👉 I'm a host on the React Round-Up podcast: https://devchat.tv/podcasts/react-round-up/ 👉 Don't forget to subscribe to this channel for more updates: https://bit.ly/2E7drfJ 👉 Discord server signup: https://discord.gg/ddMZFtTDa5 👉 VS Code theme and font? Night Wolf [black] and Operator Mono 👉 Terminal Theme and font? oh-my-posh with powerlevel10k_rainbow and SpaceMono NF 0:00 Introduction 0:27 Setup 1:38 Creating useFetch 6:42 [ DANGER ZONE ] Depending On Objects 7:30 All About References 13:17 Fixing Our Dependencies 15:16[ DANGER ZONE ] Function Dependencies 19:02 Quick Check-In 19:50 Cleanup Functions 21:25 Depending On State Mutated In The useEffect 24:51 Outroduction #reactjs #useEffect

Comment