Mastering React's useEffect

preview_player
Показать описание
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.

👉 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
Рекомендации по теме
Комментарии
Автор

This is by far one of the most useful videos I have watched over my 10 years of youtube watching career. seriously. I wathced it twice yesterday, didn't get it. Rewatched today and get everything. Absolutely great video.

joonkim
Автор

I thought I'd just about mastered useEffect but this taught me even more. Especially about what react does under the hood. Your videos are a goldmine.

Crevulus
Автор

Kudos to YouTube algorithm for recommending this gold mine!! Every time I re-watch the same lecture, I learn something new from it. Even the shorts are too useful. Thanks for all your effort mate!!

sayantanmanna
Автор

This is one of the best break downs of a hook I have seen, hope to see more like this.

lukeotwell
Автор

The useCallbackRef pattern is EXACTLY what I was missing in my mental puzzle to properly memoize passed functions. Thanks 🙏

OleksandrDanylchenkok
Автор

Every react dev should watch this video. You explain concepts so clearly and at such a good pace! All your content is so good man!

onthecodeagain
Автор

This video literally cleared up a lot of confusions. Really grateful. This video is a gem 💎

bishalpandit
Автор

very clear and an in depth uses of some of react hooks, thanks Mr. Jack as a usual!

habtamudesalegn
Автор

Jack, just found your channel today. Really great content 🎉 thanks for the crystal clear explanation that are built up like a gradual layering of knowledge and skill. This is how tutorials should be.

AZisk
Автор

This is the best piece of content on useEffect I have seen so far. It's so clear conceptually and pratically on point. I legit feel more confident using useEffect now, I get it!!
Thank you Jack!

ExistentialCuriosity
Автор

That last part, using state as dependence I didn't know that.
This video is packed with lot of very important lessons. Thanks buddy.

Greetings from Tanzania 🇹🇿

raymondmichael
Автор

So amazing that you explain all aspects of a feature deep and complete like this

miladmohammadi
Автор

Thank you so much for this. I've been struggling with this for weeks!

nairanvac
Автор

This is easily one of the best code related (at least when it comes to React) videos I have ever watched. I thought I had a pretty good idea about how useEffect worked, but I learned a lot from this and deepened my understanding. I'm sure there are optimisations I can do in my codebase now armed with this knowledge :)

apresthus
Автор

Best explanation of useEffect I have ever seen. Thanks so much!

arkadyvinkovsky
Автор

Excellent video, excellent channel. The examples you bring are amazing and the way you explain the content, step by step, is really cool. Hello from Brazil!

joelalmeida
Автор

Your videos actually helped me a few times at work. Hope you'll keep up uploading

mateuszrychlik
Автор

I'm a big fan of all your tutorials about React, you are an excellent teacher! If you're interested I (and the community I'm sure) would appreciate to have a dedicated video on useRef fundamentals, behavior and use cases!

amwebexpert
Автор

This is really cool. I once taught I knew all about useEffect, but watching this made me realize I never new nothing. Love how you broke it down. Keep it up

benrobo
Автор

Just discovered your channel now, and I'm very impressed with the lucidity of your explanations!

smoothbeak