Event Delegation in JavaScript, Simplified

  Рет қаралды 14,718

Deeecode The Web

Deeecode The Web

Күн бұрын

Event Delegation is an event handling pattern based up on the concept of Event Bubbling in the DOM. The idea is that you delegate the handling of an event (triggered on an element) to its parent or ancestor element.
This can improve performance in your applications as you use fewer event listeners for the same logic.
Learn about Event Bubbling here: • Event Bubbling in Java...
Learn about the querySelector document method here: • HOW TO SELECT DOM ELEM...
_____
Subscribe to My Channel: bit.ly/deeecode
_____
🌟 About Me:
Dillion Megida, creator of DEEECODE, is a Software Engineer, Developer Advocate and a Content Creator passionate about simplifying topics around Tech via articles and videos.
_____
⚡️ Connect with me:
Personal youtube: / dillionmegida
Personal website: dillionmegida....
Twitter: / iamdillion
Instagram: / deeecode
LinkedIn: / dillionmegida
GitHub: github.com/dil...
_____
#deeecode

Пікірлер: 70
@hybs9473
@hybs9473 2 жыл бұрын
Maaan! Thank you for this. You use simple english to explain things, straight to the point, very concise with a lot of examples. I easily understood what event delegation is. Only gripe I had is the 'target' event not explained enough, but that's on me, I need to research more on that. Thank you very much. Might check out your other tutorials because of how well you teach the topics. Hope you get a lot of subscribers so you get motivated to post more good tutorials like this.
@deeecode
@deeecode 2 жыл бұрын
Thank you so much for the helpful feedback 🙏🏾 I appreciate it. And thanks for the kind words also You mean the target object not being explained clearly?
@hybs9473
@hybs9473 2 жыл бұрын
@@deeecode Hey man, Yes, that target object, but that's on me, I have to research that on my own to learn further. Can I request some topic for other videos? Can you do a tutorial for promise, async and await and a separate video talking about JSON and API's? I'm currently enrolled on UDEMY but I like your teaching style more (slow and clear that is more suitable for beginners). Thank you man, don't sweat my request too much, I understand that it's pretty hard to slip these things in your schedule.
@DillionMegida
@DillionMegida 2 жыл бұрын
@@hybs9473 I appreciate your feedback. I'll push in event.target on my list. Promises, async and await are already there--scheduling a time is the problem. Will also add JSON and APIs to the list. But what I can say right now is that expect a video on event.target on my channel soon. Will leave a comment here when I do that :) Thanks again for the engagement. And I love that my videos are simple enough 😇
@deeecode
@deeecode 2 жыл бұрын
Here is the video on event target kzbin.info/www/bejne/hGrZdot3jLWspLc 😇 I would love your feedback on it after watching, if it's simple enough. Thank you
@joelfuelling8725
@joelfuelling8725 Жыл бұрын
@@DillionMegida Fun tip, change your e.target to a variable right away you can reference so you're not writing e.target everywhere.
@HarshSingh-hk8fe
@HarshSingh-hk8fe Жыл бұрын
that's really a cleanest explaination no bullshit straight to the point thanks alot bro
@deeecode
@deeecode Жыл бұрын
So glad you find it helpful 😊
@FranklinAirlonger-jm3pj
@FranklinAirlonger-jm3pj Жыл бұрын
You’re good bro, the simplicity of your classes are superb
@deeecode
@deeecode Жыл бұрын
I appreciate that! Glad you like them
@tommuc8538
@tommuc8538 2 жыл бұрын
Wow, that was super clear and simply. Thx.
@deeecode
@deeecode 2 жыл бұрын
Glad you liked it! You're welcome
@mlindatech
@mlindatech Жыл бұрын
Man you are wonderfully simple English straight to the point beautiful✌️🙏
@deeecode
@deeecode Жыл бұрын
Thanks for the feedback 🙌🏾
@Al-taram2025
@Al-taram2025 Жыл бұрын
Your teaching style is really amazing ❤❤❤
@deeecode
@deeecode Жыл бұрын
Glad you enjoyed it
@timeless268
@timeless268 Жыл бұрын
The explanation is AWESOME ! Thank you so much❤
@deeecode
@deeecode Жыл бұрын
So so glad it was helpful!
@JD-hq1kn
@JD-hq1kn Жыл бұрын
You really simplify things.. Thanks man !!
@deeecode
@deeecode Жыл бұрын
you're super super welcome :)
@JD-hq1kn
@JD-hq1kn Жыл бұрын
@@deeecode how can I get in touch with you bro ?
@victorartb
@victorartb Жыл бұрын
Super clear! Thanks Mate!
@deeecode
@deeecode Жыл бұрын
So glad to hear. you're welcome!
@macmee7440
@macmee7440 3 ай бұрын
Thanks bro, great video
@riyatiwari7178
@riyatiwari7178 2 жыл бұрын
Thank you so much, loved it! Keep uploading this series. ❣❣
@deeecode
@deeecode 2 жыл бұрын
Thank you! Will do!
@Wildrespect
@Wildrespect Жыл бұрын
Nahh… this tut right here is dope🔥
@deeecode
@deeecode Жыл бұрын
I’m glad you find this so 😀
@shehnazameer1209
@shehnazameer1209 4 ай бұрын
that was helpful. thank you!
@deeecode
@deeecode 3 ай бұрын
I'm so glad to hear
@BriariusTitan
@BriariusTitan Жыл бұрын
Thanks for the help, you clarified it well.
@deeecode
@deeecode Жыл бұрын
You're welcome!
@PaulJBurgess
@PaulJBurgess 11 ай бұрын
Thank you! I'll be back to this channel, I'm pretty sure.
@godugunurumanoj733
@godugunurumanoj733 Жыл бұрын
Awesome explanation i loved it.
@deeecode
@deeecode Жыл бұрын
Glad it was helpful!
@godugunurumanoj733
@godugunurumanoj733 Жыл бұрын
Yes I am confident about this concept
@codingwithvikas7484
@codingwithvikas7484 6 ай бұрын
Love from India ❤
@shafee-e
@shafee-e Жыл бұрын
maaaaaaaaaaaaaaaaan!! you're a legend.
@deeecode
@deeecode Жыл бұрын
Glad you found the video helpful :)
@malikmartin
@malikmartin 10 ай бұрын
Thanks! This should help me write cleaner (and more optimized) code!
@deeecode
@deeecode 10 ай бұрын
Glad it helped!
@himxai
@himxai Жыл бұрын
Thanks love your explanation 💯
@deeecode
@deeecode Жыл бұрын
Glad it was helpful!
@RishabhJain-uv7zj
@RishabhJain-uv7zj Жыл бұрын
Nice explanation. Thanks
@deeecode
@deeecode Жыл бұрын
Glad it was helpful!
@codelery414
@codelery414 28 күн бұрын
Awesome 👍
@york2301
@york2301 Жыл бұрын
Keep up the good work!
@deeecode
@deeecode Жыл бұрын
Thank you so much!
@himankhoranyy124
@himankhoranyy124 2 ай бұрын
Useful, tnx
@user-nm7in5cm3q
@user-nm7in5cm3q Жыл бұрын
great video - thank you!!
@deeecode
@deeecode Жыл бұрын
You're very much welcome!
@hmellahi
@hmellahi Жыл бұрын
Loooove it, keep it uP!
@deeecode
@deeecode Жыл бұрын
Thank you! Will do!
@fatimaiqra2169
@fatimaiqra2169 5 ай бұрын
thanks a lot!
@estrellademar6937
@estrellademar6937 4 ай бұрын
thank you so much!!! i
@keddycameron2723
@keddycameron2723 2 жыл бұрын
very clear! thank u
@deeecode
@deeecode 2 жыл бұрын
You are welcome!
@youtubejproasters1224
@youtubejproasters1224 Жыл бұрын
Hey man nice video, out of curiosity, what if you had to put in these 3 buttons a different action to happen after a click event, would you make the if statement with their ids as validator? And you would make 3 if statements for different action if event.target === button 1 for example etc etc ?
@mlindatech
@mlindatech Жыл бұрын
I really like your question man!
@shishirbhurtel7978
@shishirbhurtel7978 Жыл бұрын
See the complexity of your application. If the purpose of the different buttons/child inside parent element have less distinct or similar purpose, you can use conditional handling. Else if they have distinct purposes using different eventListners in each buttons/child will be more helpful.
@gaurangshroff
@gaurangshroff 2 жыл бұрын
Very well explained
@deeecode
@deeecode 2 жыл бұрын
So nice to hear
@Vc00018
@Vc00018 Жыл бұрын
very helpfull !!
@deeecode
@deeecode Жыл бұрын
Glad it was helpful!
@adibahbab6859
@adibahbab6859 Жыл бұрын
Thanks man.....
@cescr3821
@cescr3821 2 жыл бұрын
awesome dude ty.
@deeecode
@deeecode 2 жыл бұрын
You're greatly welcome!
@thefootballcore
@thefootballcore Жыл бұрын
hey, do you play football , if yes, Chelsea is ready to sign you mate , you match perfectly with their needs
@PaulJBurgess
@PaulJBurgess 11 ай бұрын
Subbed!
VAR, LET and CONST - Differences between these keywords
13:10
Deeecode The Web
Рет қаралды 2,9 М.
JavaScript Event Bubbling and Capturing MADE SIMPLE!
15:53
The Code Creative
Рет қаралды 6 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
Learn Event Delegation In 10 Minutes
9:57
Web Dev Simplified
Рет қаралды 67 М.
Event Bubbling in JavaScript, Simplified
5:00
Deeecode The Web
Рет қаралды 19 М.
Explained Event Delegation and Event Bubbling | JavaScript Basics
5:20
JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue
12:35
EVENT.TARGET, in JavaScript, Simplified
7:54
Deeecode The Web
Рет қаралды 26 М.
JavaScript Visualized - Promise Execution
8:42
Lydia Hallie
Рет қаралды 208 М.
Only The Best Developers Understand How This Works
18:32
Web Dev Simplified
Рет қаралды 119 М.
The Importance of THIS in Javascript
22:59
developedbyed
Рет қаралды 22 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН