Bind in javascript | chai aur

  Рет қаралды 66,703

Chai aur Code

Chai aur Code

Күн бұрын

Пікірлер: 266
@thecalgarians4597
@thecalgarians4597 8 ай бұрын
Mind blowing. I could never imagine this deep down lies the use case of bind() in JS and erstwhile React
@sirdragoon4625
@sirdragoon4625 Жыл бұрын
If someone is confused here is the summary , since we are calling this.handleClick and this here is button as console.log(this) gives , so button do not have handleClick access (that's why its coming as undefined ) , so we have to explicit bind this to the class context (Which is React) to get the access. Hope it is clear😀
@SarveshKumar-08
@SarveshKumar-08 Жыл бұрын
00:02 Introduction to the early days of React 01:28 Learning JavaScript basics for free on KZbin. 02:51 Discussing the creation and functionality of a class in React 04:31 Creating and handling button click events in JavaScript 05:57 Adding event listeners and handling button click events in JavaScript 07:26 Understanding button references and React methods 08:53 Explaining the use of 'BIND' keyword in JavaScript 10:19 Access to libraries and functions inside React
@blackopss017
@blackopss017 Жыл бұрын
The day I will get a job...I am gonna share small stake of my salary with those youtubers who taught me programming and Hitesh Bhaiya is one of them.
@theedit9028
@theedit9028 Жыл бұрын
Wow 🙏
@MohsinKhan-wv3ep
@MohsinKhan-wv3ep Жыл бұрын
He don't wany your money , but the thing he may appreciate, which you can give is by achieving your goal and helping others to achieve their goal ❤
@sandeepswain6202
@sandeepswain6202 Жыл бұрын
Broo I have the same motive too . Let's go 😊
@manashvardhan9965
@manashvardhan9965 10 ай бұрын
Same
@vanshkumar-9042
@vanshkumar-9042 9 ай бұрын
What happened brother! Have you get the job?
@codebreaker8055
@codebreaker8055 9 ай бұрын
I'm 100% sure this is the best series of JavaScript on KZbin. Love you sir videos nhi rukhne chahiye or chai banti rehani chahiye
@DashinDanish
@DashinDanish Жыл бұрын
Indeed! We humans always tend to take things for free for granted. But here, let's not do that. He's putting his precious time and efforts just to teach us so that we may get a job. Let's share his videos everytime we see it in the feed!
@gopishaw111
@gopishaw111 Жыл бұрын
I found an Interesting concept regarding 'this' that it does not overrides the content of 'this' in callback function:- In JavaScript, the bind() method creates a new function that, when invoked, has its this value explicitly set to the value provided as an argument to bind(). It doesn't override this in the original function; rather, it creates a new function with a bound context.
@shreyakolekar4059
@shreyakolekar4059 Жыл бұрын
Thank you Hitesh Sir for teaching such deep concepts and history of JS coding. Still hard to believe that we are getting this for free. I've done courses on Udemy, but nothing compares to your amazing videos! ❤
@pullurupraveen9315
@pullurupraveen9315 2 ай бұрын
can u please explain the concept in english
@superherofreak837
@superherofreak837 24 күн бұрын
We love you, Sir. We all know how much effort you put into making these videos. When I start earning, I will contribute a part of my income to you through this channel as a token of gratitude because your teaching has provided me with immense value in my life.
@salmansalman-pc8di
@salmansalman-pc8di 2 ай бұрын
Thankyou Sir for such useful content for free on youtube...Really appreciate your work. Please keep it up.
@ManojSingh-b1j3i
@ManojSingh-b1j3i 5 ай бұрын
thanky sir , cheeje bhale kaam main aaye na aaye per unki knowledge honi bhut jaruri hai , aapka bhut bhut dhanywad ki aap ne itna achaa course banaya , warna past ka pata nhi or future ko define karne chale , isse lagata hai ki past ki knowledge hona bhut hona aawayasak hai , danywad ,
@namankatiyar5843
@namankatiyar5843 Жыл бұрын
Best course of JS, No one teaches this much of depth. Thanks for the effort you have made.
@Code_Kingdom999
@Code_Kingdom999 Жыл бұрын
Hitesh sir best teacher in my view koi koi yhi java script 10000 NRI se pd rha ha aur koi koi koi koi yhi java script 25000 NRI se pd rha ha aur koi lkhao dekr kisi me itna clear or basic stand ni jo ki sirf HITESH Sir me ha Big Fan of HITESH sir
@Vaishnavi-x3h3x
@Vaishnavi-x3h3x 26 күн бұрын
Thank you so much for this amazing playlist. I learned alot through this 🥰🥰🥰🥰🥰🥰
@AHEAVR
@AHEAVR 2 ай бұрын
your javascript course is far beyond the bound, its fire, have never seen anyone in my life to share this much of detail in one course, that also free ❤‍🔥❤‍🔥
@ayushrajput6108
@ayushrajput6108 3 ай бұрын
Thankyou Hitesh sir I got new things best teaching about javascript learned much cj's concepts easily 🎉
@dcsalim4384
@dcsalim4384 5 ай бұрын
Love you sensei 🙏 kabhi socha nehi tha free me bhi itna quality content mil sakta hain hats off sir
@btech_Algorithm
@btech_Algorithm 11 ай бұрын
best tutorial on JavaScript ever exist on earth. I think after spending a big amount of money for learning JavaScript, that also not comparable or even close to these tutorial. Thank You sir..! kudos...... like please everyone
@VIPUL27
@VIPUL27 11 ай бұрын
Sir apke prem prem ke chakr me ye series maine 3 bar dekh dali😁
@len5755
@len5755 Жыл бұрын
10:45 witty humble bragging Thanks for these videos
@chaiaurcode
@chaiaurcode Жыл бұрын
😎😁😂
@bibek2507
@bibek2507 Жыл бұрын
Thank you Hitesh and the whole team behind this beautiful JS course.
@Sadestlover
@Sadestlover Ай бұрын
00:02 ✦ Learning JavaScript basics for free on KZbin. 01:28 ✦ Discussing the creation and functionality of a class in React 02:51 ✦ Creating and handling button click events in JavaScript 04:31 ✦ Adding event listeners and handling button click events in JavaScript 05:57 ✦ Understanding button references and React methods 07:26 ✦ Explaining the use of 'without' keyword in JavaScript 08:53 ✦ Access to libraries and functions inside React
@nehabansal370
@nehabansal370 9 ай бұрын
Thank you Hitesh Sir for teaching such concepts with simplified explanation along with JS history. I have not seen any paid or free content so far, that can touch your way of teaching
@motivetochange759
@motivetochange759 11 ай бұрын
I really appreciate and love your work ❤. Jitna aapne deep mein jakar padhaya hai, utna to koi soch bhi nahi padhane ka. Aapke wajah se hee mere jaise developer aspirant ko umeed ki roshani dikhati hai . Thank you sooooooo much Hitesh bhaiya ❤
@Shubham_Gupta_ji
@Shubham_Gupta_ji 10 ай бұрын
You are the best teacher who provide all the paid content for free. Even the paid content doesn't provide so Deep knowledge as they only want to sell more and more courses. 🔥🔥🔥
@wahajuddin-l1i
@wahajuddin-l1i 2 ай бұрын
"In simple terms: Without the bind method, an event listener only has access to the context (or this) of the element that triggers the event (like a button in this case). So, in your example, the handleClick event listener only has the button's context (this refers to the button itself). Using the bind method, we can set the this context to a different object, allowing us to access the context where the event listener was created, not just the button's context."
@ArunSharma-we2xy
@ArunSharma-we2xy 8 күн бұрын
No sir, You are best youtuber for technical courses
@sajeelahamedsyed62
@sajeelahamedsyed62 Жыл бұрын
Thanks Bhai aap ne bohat acha samjaya bind function. U r the inspiration to me as a teacher and role model
@shivanshupathak8702
@shivanshupathak8702 9 ай бұрын
Such a sweet guy! 1:46 Keep the good work going Hitesh sir💪
@VikashSingh-hc6zo
@VikashSingh-hc6zo Жыл бұрын
Thanks a lot sir. Chai k sath javaScript ka under the hood behaviour or khi dekhne ko ni milta sirf yaha milta hai
@shikharpandya4927
@shikharpandya4927 Жыл бұрын
Sir I find ur Js series as the best in YT. Your tutorials gives insights of the topics which are not discussed much by others . Lots of love and respect for ur hard work for helping us out by sharing ur knowledge ❤😄
@satyamraj6800
@satyamraj6800 5 ай бұрын
best video for bind sir..❤❤❤
@Anime-vk6xq
@Anime-vk6xq 4 ай бұрын
Best series to learn about JavaScript in depth.
@Rohithakur07
@Rohithakur07 10 ай бұрын
Thankyou so much , it is the best javascript series in the history of mankind❤❤❤
@tech_channel110
@tech_channel110 Жыл бұрын
shandar shandar lectures behtareen series behtareen video
@prashantsingh5142
@prashantsingh5142 Жыл бұрын
Overwhelmed by the quality ..thanx alot.
@Coder-rohits
@Coder-rohits 7 ай бұрын
Sir aapke iss prem ko kabhi nahi bhul paunga.
@h3m4n5hu
@h3m4n5hu 6 ай бұрын
bahut bahut dhanyavaad sir aapke efforts ke liye!
@Jen_Gaming23
@Jen_Gaming23 Жыл бұрын
Loved this series. Very much appreciated sir❤️
@prasadtambde3894
@prasadtambde3894 Жыл бұрын
"Love the perfect blend of tech and tea on Chai aur Code! Engaging content and soothing vibes make it my go-to channel. Keep brewing knowledge!"
@vipin143kumar
@vipin143kumar Жыл бұрын
Hello Sir 😘, ur tutorials hv been an invaluable resource 4 me n many others who r eager 2 learn n expand our knowledge. Ur teaching style is not only engaging but also incredibly effective. U've a unique talent 4 breaking down complex concepts into easily understandable parts, which has made learning so much more accessible. Thank You for Being an Amazing KZbin Tutor 🙌
@PratulMakar
@PratulMakar 4 ай бұрын
Thank you very much sir chai ke sath☕
@BitFire007
@BitFire007 9 ай бұрын
"Chai aur Code, you're the mentor I wish I had when I started learning JavaScript. Incredible job!"
@bellCarter-c5j
@bellCarter-c5j Жыл бұрын
bhut bbadhiya series h , keep it uppppppppp :) so im learning JS because i have to create project , bythway you are so grearfull ,
@priyanshukumar6679
@priyanshukumar6679 Жыл бұрын
Sir is Wale topic PE to bahut hi maja agye ❤❤❤ Sir apse padhkr to js ke concept pehle se hi dimaag mein chal rha hai GOLDEN GEM hai app js ke thanku so much sir ❤❤❤😊😊
@JugaaduFinance
@JugaaduFinance 9 ай бұрын
Thank you so much sir for these videos.
@mayeshafairuz
@mayeshafairuz 10 ай бұрын
I usually quit things when i get bored but sir apke efforts hme bhi boost kr rhe hy! Thank you so much for your endless efforts and with your kind smile! God Bless You Sir!!
@akshayjain2777
@akshayjain2777 Жыл бұрын
Thanks sir jii ❤‍🔥 your efforts are priceless ✌ such a deep content you are giving free. What a man you are sir jii
@Vikramsinghmertiya863
@Vikramsinghmertiya863 Жыл бұрын
Thanks a lot for the insightful javascript series on KZbin! It has been incredibly helpful in enhancing my understanding of the language.
@jayateerthkakhandki255
@jayateerthkakhandki255 11 ай бұрын
Thank you so much Histesh sir. The concepts you teach are very deep and understandable. Nobody teaches concepts this well for free. Thank you so much for delivering such high quality content with your hard working efforts.
@AnkushRana-p9h
@AnkushRana-p9h 10 ай бұрын
its hard to believe that we are getting this beautiful detailed course for free.
@avipatel7106
@avipatel7106 Жыл бұрын
Easy to understand Hitesh sir, thank you for sharing
@jointheamnaofficial
@jointheamnaofficial 3 ай бұрын
Thanks for the series 😊
@mayanksinghrana4446
@mayanksinghrana4446 9 ай бұрын
Thank you, Hitesh sir, for your invaluable insights and deep understanding of JavaScript. Your expertise has been instrumental in enhancing my understanding of this language and has truly empowered me to become a more proficient developer. Your passion for sharing knowledge is inspiring, and I am incredibly grateful for the guidance you provide. Here's to continued learning and growth together.
@BOSS55
@BOSS55 11 ай бұрын
thanks ji
@its_Amit_00
@its_Amit_00 5 ай бұрын
i know sir you are doing a great work ....... #02:19
@deepakbaghel2444
@deepakbaghel2444 Жыл бұрын
Best js course on entire KZbin ❤❤❤
@RagSingh-e2e
@RagSingh-e2e 10 ай бұрын
best Series ALL OVER THE UNIVERSE, thank you Sir 🙏
@ronakTV12
@ronakTV12 4 ай бұрын
Thank You SIr
@wrongturn7865
@wrongturn7865 4 ай бұрын
Best js course ever in decades
@39_ganesh_ghodke98
@39_ganesh_ghodke98 Жыл бұрын
Thank you for this great series 👍
@MightyYoutuber-mb7xd
@MightyYoutuber-mb7xd 8 ай бұрын
Amazing content💖💖
@sp1460
@sp1460 2 ай бұрын
east or west, sir ke courses are best
@Hamza-Pro-Dev
@Hamza-Pro-Dev 5 ай бұрын
1:47 Appreciated ☺
@RayanTanzeem
@RayanTanzeem 11 ай бұрын
Thank you so much sir 💚
@bimandas4794
@bimandas4794 Жыл бұрын
thank you sir for that much detailed knowledge...
@rohitthakur7090
@rohitthakur7090 Жыл бұрын
hats off to your dedication hitesh sir
@koustavmaity-fh3gx
@koustavmaity-fh3gx Жыл бұрын
god level teaching!!!!!.
@RishirajDesigns
@RishirajDesigns Жыл бұрын
We appreciate your efforts sir 🙏
@ano3000nymous
@ano3000nymous 4 ай бұрын
In the line "this.handleClick.bind(this)" the first 'this' refers to the React class as the function 'handleClick' is in the React class and the function reference in the event listener is also being written in the React class. The 'this' parameter in the bind method also refers to the context of React class as it will be used by 'handleClick' method to log out the server property of React class. Is this right?!?
@utkarshdixit4611
@utkarshdixit4611 Жыл бұрын
Osm❤
@BioChemAcademy
@BioChemAcademy 8 ай бұрын
just for comment purpose {If someone is confused here is the summary , since we are calling this.handleClick and this here is button as console.log(this) gives , so button do not have handleClick access (that's why its coming as undefined ) , so we have to explicit bind this to the class context (Which is React) to get the access.}
@vaibhavsingh3453
@vaibhavsingh3453 11 ай бұрын
Thank you sir 🙏❤️
@rahuldev6206
@rahuldev6206 10 ай бұрын
Bhai next level No comparison
@mehaksharma-jt7sx
@mehaksharma-jt7sx Жыл бұрын
apka bohot bohot dhanyavad sir , appreciate a lot
@umarnoor7417
@umarnoor7417 Жыл бұрын
Much value provided Sirji....
@rakshitchopra2612
@rakshitchopra2612 Жыл бұрын
Sir u are the best teacher
@zohaibshahzad4567
@zohaibshahzad4567 9 ай бұрын
love you sir :) Watching your series from Germany
@vaibhavsingh3453
@vaibhavsingh3453 11 ай бұрын
document .querySelector('button') .addEventListener('click', () => this.handleClick.call(this)); If we use call like this then it'll also work. I was so much consued about it and researched so much about bind and call. I almost got the clarity but i am still little bit confused but it's ok... 🤧🤧🤧🤧
@pratiksingh23
@pratiksingh23 11 ай бұрын
But, did you notice that if the button is clicked, it does nothing when "call" is used. Also, the button need not be clicked to produce that output that you are getting. It is because, the function this.handleClick.call(this) is not passed as reference as we have seen in the case of "bind". It is immediately gets executed as the constructor is called (how constructor is called -> when page reloads). Whereas, bind method just produces the reference for function to be called later point of time by binding this to the passed argument to the bind function. That is why, as soon as the page reloads it prints the same output as this.handleClick.bind(this). Button has no reference to execute a function. Basically it has undefined. addEventListener also doesn't generate error as it got undefined (return value of handleClick()).
@vaibhavsingh3453
@vaibhavsingh3453 11 ай бұрын
@@pratiksingh23 bro, using call like this just works exact same as bind. And my code is working properly and button as well. Because using call() immediately executes the function that is why I have wrapped it in another arrow function, so that it doesn't get's executed immediately as we load it into the browser. If you don't wrap this .call() method like I did, only then it will create such problem that you mentioned. If you want to pass that function as reference and also you don't want to use bind. You can write it this way: "()=>{this.handleClick.call(this)}" It works just same as using bind like this: "this.handleClick.bind(this)" At the end of the day it depends on your choice what syntax you prefer. But obviously bind is more commonly used in even handling so if you want your code to maintain some industrial standards then you'll have to follow the preferred way. Hope it gives clarity! Thanks! 😊❤️
@vaibhavsingh3453
@vaibhavsingh3453 11 ай бұрын
​@@pratiksingh23bro, using call like this just works exact same as bind. And my code is working properly and button as well. Because using call() immediately executes the function that is why I have wrapped it in another arrow function, so that it doesn't get's executed immediately as we load it into the browser. If you don't wrap this .call() method like I did, only then it will create such problem that you mentioned. If you want to pass that function as reference and also you don't want to use bind. You can write it this way: "()=>{this.handleClick.call(this)}" It works just same as using bind like this: "this.handleClick.bind(this)" At the end of the day it depends on your choice what syntax you prefer. But obviously bind is more commonly used in even handling so if you want your code to maintain some industrial standards then you'll have to follow the preferred way. Hope it gives clarity! Thanks! 😊❤️
@kishan-74537
@kishan-74537 8 ай бұрын
thank you so much sir for this playlist
@sahdevdomadiya8665
@sahdevdomadiya8665 9 ай бұрын
sir bohut hi help mil rahi he thanks. please sir raect native pe bhi ek playlist bana dijiye.💗💗💗💗💗
@ayushi1517
@ayushi1517 Жыл бұрын
Thank you sir for this good lectures of js🥰
@VishalSharma-rn7mt
@VishalSharma-rn7mt Жыл бұрын
superb explanation Sirji
@aggsha7580
@aggsha7580 4 ай бұрын
Thanks A Lot Sir ❤❤
@saptathirtachoudhury4158
@saptathirtachoudhury4158 8 ай бұрын
Hitesh Bhai is always the best
@kekinchheda8097
@kekinchheda8097 Жыл бұрын
Thanks Hitesh Bhai for bringing informative video!
@tanoypaul
@tanoypaul 11 ай бұрын
Thanks sir for your kind afforts 💙💙
@JayveerPal-vq4be
@JayveerPal-vq4be 4 ай бұрын
love this Series
@jayashreedas5931
@jayashreedas5931 Жыл бұрын
Thanks, sir ji.....I bow to thee, a crore crore times..
@GAMERDHRUVSHORTS
@GAMERDHRUVSHORTS 8 ай бұрын
thank you sir
@feelawesome251
@feelawesome251 9 ай бұрын
1:46 - sir aap toh Bihar UP mode m chal gaye 🙂 But thank you so much sir. for this wonderful course.
@programmer1682
@programmer1682 3 ай бұрын
❤ superbbbbbb❤
@rishavraj3127
@rishavraj3127 5 ай бұрын
Thank you .....,😄😄😄😄😄😄😄😄😄😍😍😍😍😍😍😍😍😍😍
@arjunshukla9328
@arjunshukla9328 Жыл бұрын
Sir your teaching is awesome
@rahamatshaikh8285
@rahamatshaikh8285 7 ай бұрын
from lacture 1 to here .................😍
@shyam_soni99
@shyam_soni99 11 ай бұрын
"Hitesh sir 's JavaScript series is a goldmine of knowledge, transforming beginners into proficient developers! 💡 ''
@MohammedHasmi577
@MohammedHasmi577 8 ай бұрын
Thank you guruji❤
@roshanp7256
@roshanp7256 11 ай бұрын
Thankyou sir keep it up ♥
@helloJs21
@helloJs21 9 ай бұрын
Best js tutorial thanku so much sir
@surajgoraicse
@surajgoraicse 5 ай бұрын
Sir , you are great.
Now you know Objects in Javascript | chai aur #javascript
19:46
Chai aur Code
Рет қаралды 56 М.
Class constructor and static | chai aur #javascript
26:36
Chai aur Code
Рет қаралды 99 М.
Tech for 2025 | No nonsense guide
17:38
Chai aur Code
Рет қаралды 84 М.
Lexical scoping and Closure | chai aur #javascript
26:48
Chai aur Code
Рет қаралды 110 М.
Promise in javascript | chai aur #javascript
50:21
Chai aur Code
Рет қаралды 318 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 1,1 МЛН
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 709 М.
Call and this in javascript | chai aur #javascript
13:06
Chai aur Code
Рет қаралды 79 М.
Object Oriented in Javascript | chai aur #javascript
32:03
Chai aur Code
Рет қаралды 177 М.
Pick these tech to make or destroy your tech career
15:52
Chai aur Code
Рет қаралды 60 М.