Click Outside to Close - React Hook

preview_player
Показать описание
In this video I'll show you how to make a hook that runs whenever the user clicks outside of a DOM node.

Рекомендации по теме
Комментарии
Автор

Cannot read property 'contains' can be fixed by changing current.contains to current?.contains

codymccarty
Автор

What a great simple-to-understand solution. I was searching for this all over the web and could not find this kind of solution.
Thanks a lot, man.

alirasheedmd
Автор

This was exactly what I was looking for! Thanks, Ryan!

sjadev
Автор

Thanks, very clear! Thanks for taking that one extra step at the end about designing a reusable hook :)

dschenck
Автор

Clear and straightforward explanation, just what I'm looking for thanks.

DevRSC
Автор

Thanks Mate . Great explanation and it was short and to the point

ShubhamBohra
Автор

Thank you for this. I used this code in my project and referenced this video in the code. Please make more practical videos like this!

salymakhmedov
Автор

your way of doing it was much easier, faster and clearer then others i saw online. thank you!!

gasgodgasoline
Автор

Not only I got perfect solution for my problem
But also I learned a new cool technique (creating hook) to handle this problem with more efficiency !
Thank you very much !!!!

adarshshete
Автор

What a clear explanation, thank you so much, Ryan! My problem is now solved and you have a faithful new subscriber.

EmilyNilsen
Автор

It is in fact very nice Ryan, your explanation also, clear and concise. Thanks a lot! Greetings from Argentina.

ezequielvallejo
Автор

This is a simple but powerful solution really handy

chineduknight
Автор

You beauty... What a clear explanation. Hats off sir. I immediately subscribed to your channel. You are a great teacher. Thanks a lot 👍👍

praveethbabu
Автор

Many many thanks Sir...🙂🙂
I've solved a problem watching your video🙂

faisalahmad
Автор

Thank you so so much. I was looking for this for a long time. May God bless you.

fazlechistyhimel
Автор

Thanks for this vid ryan! amazingly well explained! I gave helped solve that feature I didn't know how to implement with hooks

vancouverjunkremoval
Автор

Thanks for you from Brazil!!! You helped me a lot

thiagonunesbatista
Автор

That was exactly what I was looking for! Thank you, Ryan!

lyuftwaffelnica
Автор

God Damn!! This was brilliant, no one else online has a solution like this!⭐⭐⭐⭐⭐

geezer
Автор

the way of doing the coding makes it better to understand the context and help to lose less time each time we go through it for a modification or anything.

As if when riding a bike, if every time we need to assembly it and then ride it, it is better if it's ready and prepared just like normally would be.

sergiopile