you know what i have never build a production ready app or any project yet but still i enjoy these videos and interestingly i'm getting almost everything what he is talking, making improvement in something is always exciting and fun. please make such great videos
I know sir you won't read this comment but Thank you so much sir I have completed your mern course and that gave me so much confidence in creating React and other full stack web applications. Again thank you sir from the bottom of my heart.
Thanks a lot Hitesh. I watched so many videos but this is the best explanation useRef can have. Thanks man!! I hope you make bigger videos and your subscribers will be very happy to watch them. :)
Completely different example used from all the other videos on youtube for useref!! Great Work. Just one ques: isn't changing the width of input box a re-render???
Thanks a lot. I now have a better understanding. Gotta say please Inculcate these philosophy part in courses too. I was disappointed by one of your course but your youtube videos seem to be more curated than courses
Awesome explanation!!! Thank you so much @Hitesh Sir! for creating such a nice video for all viewers who are learning react like me. For me the best part of the video was the summarization of whole concept in last. I changed my video playback speed to 0.75 to understand what you just said. LOL!!!
Hello :) Thank you for taking the time to explain it. It was such a great great video, but I just want to mention something that you already spoke in the beggining of the lesson. From a student perspective we usually go for longer or medium videos and 20min video its I think quite good. I refuse to see videos about 5min for each conxept. Coding is about conxepts and not syntax. You can steel code up and down but its more useful if you steel code but at least you understand the flow of the code and you can modify when you are asked. So thank you again for your work.
If useRef doesn't cause re-render then how the text box size got bigger, because any change in DOM Elements can only be visible when it gets re-rendered. Please correct me if I am wrong. And thanks a lot Hitesh, it was a great video with amazing explanation.
That's because when we use useRef it returns a actual DOM reference and when you edit the actual DOM you don't need re render to see those changes, they are applied directly
18:20 did anyone notice the console log showed width as 400, although the code to change width was sequentially after logging statement, ideally i would have expected it to show as width:100. Can anyone tell me why did that happen?
Wao thank you very much, your videos are really helpful. I just started learning react and these videos are great help and I don't mind long videos at all 💓
Re-rendering means re-loading of browser tab. If you use useState , with every change in state , your browser will re-load and all elements on that page will too re-reload. but in useRef , that element will only re-render not browser tab.
When you are using useRef and do something like: inputRef.current.style.width = "400px" It means that you are manipulating the DOM manually, meaning, you are not causing a re-render in the React sense, although you may very well be causing a repaint or reflow. React handles all the DOM manipulations itself so that you don't have to, it handles when something should re-render through the 'state' and virtual DOM.
Hi nice explanation about useRef sir! only question I have here is "is it good practice to directly changing the DOM structure through current property of useRef object I mean there must be some react way to manipulate the DOM like Angular has renderer2."
Hey Hithesh, i really love your videos even i used it to start my ReactJS courses. I created a big web-app which is now in production. But i always get a warning with huge chunk size problem while taking builds. I tried code-splitting in almost every page and corrected many import methods... still its not reducing. How can I find where is this size getting logged up ? Need help sir....😥
after seeing so many focus based tutorial finally this was the one that helped me understand the concept clearly. Thank you very much to you.
Yea...This one made lot more sense..
Yes, its 2024 and many youtuber are still giving example based on focus 😂😂
Literally cracked me up when you talked about that focus example.
Finally i can get my head around this confusing hook. First time watching your channel but really loved the explanation. Many many thanks to you.
you know what i have never build a production ready app or any project yet but still i enjoy these videos and interestingly i'm getting almost everything what he is talking, making improvement in something is always exciting and fun. please make such great videos
I was struggling with ReactJs for the last few days. Thanks for the last 2 videos. You are awesome 💯
Netlfix style Intro should be continued 😅
I really really appreciate the fact you didn't do the reused 'focus' tutorials everyone copied off each other. Much appreciated.
I really confuse when see my colleague use useRef in their code, but I got the whole ideal when watch this video. Thanks Hitesh so much
I know sir you won't read this comment but Thank you so much sir I have completed your mern course and that gave me so much confidence in creating React and other full stack web applications. Again thank you sir from the bottom of my heart.
This is the best and simplest way that I find for this hook
Thank you so much, sir.
You explain things so well and with patience. Thanks!
Now, i explain many react concepts very easily to anyone, all credit goes to you. Hitesh Sir ##MyDrodhachaarya🙏🙏
The simplest yet the clearest video on the internet!
Everytime you surprise me with your knowledge
Wow ! Got to say this is one of the simplest and neat explanation a layman can understand.
Thanks Hitesh. Got more clear understating of useRef.
Thanks a lot Hitesh. I watched so many videos but this is the best explanation useRef can have. Thanks man!! I hope you make bigger videos and your subscribers will be very happy to watch them. :)
Now I can say I know what is useRef, great work Sir
it took me a while to find a clear explanation of useRef. sure i will subscribe and follow you always mr.hitesh
Better than 500 rupee udemy course, love you sir ji
Really loving all the content of your channel❤️
Completely different example used from all the other videos on youtube for useref!! Great Work. Just one ques: isn't changing the width of input box a re-render???
You are always unique. Different examples are giving better idea. Very useful. Thank you!
damn , my 20mins time of my life not waste for watching this tutorial man, thank you for explaining it. . new subscriber here.
This useRef confuses the sht out of me, after watching your vid, i now somehow understand it
one of the cleanest explanations one can find on the internet... ❣️❣️
Thanks a lot 😊
was this video longer nah dude ! 20 minutes felt like 2 minutes. love your teaching style .
Thanks! I m just working on a project and need to implement useRef in that. Really helpful 😊
Glad it was helpful!
Excellent video bro! really appreciated
after going through multiple videos and not understanding the concept, there comes hitesh sir ❤❤❤
Now I got a clearly understanding of where we can use useref. Thank u
Thanks a lot. I now have a better understanding. Gotta say please Inculcate these philosophy part in courses too. I was disappointed by one of your course but your youtube videos seem to be more curated than courses
Best Tutorial. Watched from Bangladesh :)
Thank you very much :) Only your video gave me understanding of useRef
Best explanation I have ever heard about useref hook!
The concept is explained clearly....... thankyou bro.
Awesome explanation!!! Thank you so much @Hitesh Sir! for creating such a nice video for all viewers who are learning react like me. For me the best part of the video was the summarization of whole concept in last. I changed my video playback speed to 0.75 to understand what you just said. LOL!!!
You are my Guru going forward. Dheivamey.......
Thank you so much sir for this simple and useful video and I don't feel that video is longer.
you are good at this
you are AWESOME! BEST EXPLANATION EVER!
Best tutorial on useRef, no doubt
thank you so much Iam enjoying when I watch your explanation 😊😊😊
Your video covers concept and interview qns too. Thanks a lot for this video sir!
Crystal Clear❤❤
Hello :) Thank you for taking the time to explain it. It was such a great great video, but I just want to mention something that you already spoke in the beggining of the lesson. From a student perspective we usually go for longer or medium videos and 20min video its I think quite good. I refuse to see videos about 5min for each conxept. Coding is about conxepts and not syntax. You can steel code up and down but its more useful if you steel code but at least you understand the flow of the code and you can modify when you are asked. So thank you again for your work.
I dont hit the subscribe sorry...
I just make the notification ON for each video that you will upload
You had me at, You have to understand it's history!
thanks much Hitesh....you are having an incredible teaching ability.
THE best video i have even seen
best explanation so far
Great explanation @Hitesh! You simply cracked useRef :)
Best description I've seen!
This is awesome video it clears my all doubts.
If useRef doesn't cause re-render then how the text box size got bigger, because any change in DOM Elements can only be visible when it gets re-rendered. Please correct me if I am wrong. And thanks a lot Hitesh, it was a great video with amazing explanation.
That's because when we use useRef it returns a actual DOM reference and when you edit the actual DOM you don't need re render to see those changes, they are applied directly
thanks@@digvijayyamagekar7139
18:20 did anyone notice the console log showed width as 400, although the code to change width was sequentially after logging statement, ideally i would have expected it to show as width:100. Can anyone tell me why did that happen?
Because here we log the non- primitive value thats why....
Wao thank you very much, your videos are really helpful. I just started learning react and these videos are great help and I don't mind long videos at all 💓
superb explanation hitesh sir,thank u so much
Sir, please make video on useMemo() and useCallback() hook
This explanation was phenomenal. Can you explain in depth useEffect hook and all its cases?
clear and concise. Loved it
Excellent tutorial man. Keep it up!!!
wow this is best video so far. really appreciate your help tho
Best video on useRef
you have cleared it amazingly! 👏
Thanks sir made my mind more clear about useRef() hook
Brilliant explanation, love the detailed answer
Thanks for the explanation in the beginning. It was really helpful
we getting into in-depth react ...nice...looking forward to the video on lifecycle component of react
I'm confused. Useref is not supposed to render but clearly the input element is changing in width which means it was re-rendered. What am I missing?
Re-rendering means re-loading of browser tab. If you use useState , with every change in state , your browser will re-load and all elements on that page will too re-reload.
but in useRef , that element will only re-render not browser tab.
@@mayurkeswani2312 I don't think that's right.
When you are using useRef and do something like:
inputRef.current.style.width = "400px"
It means that you are manipulating the DOM manually, meaning, you are not causing a re-render in the React sense, although you may very well be causing a repaint or reflow. React handles all the DOM manipulations itself so that you don't have to, it handles when something should re-render through the 'state' and virtual DOM.
Concise and complete explanation
Good Hitesh. Keep it up.
As said in the Saturday live, thought yesterday would be live with telusko
My only question is is it good to use usestate or useref for form fields to send to api.
Thank You sir for this beautiful concise explanation!!!!!
Thankyou for this type of clearlity ❤️
I was just wondering on how to manipulate on dom elements wola! I just got my answer thank you sir.
Thank you sir for this wonderful tutorial.
you explain the why of things and that what does give your channel its adventage upon others
Sir, You are too much like my mom. You always sense it, what I want.
Can you make a video on webpack configuration for react app..now a days most of the production app are configuring webpack from scratch
Please can you make a video on shortcuts used in VS Code
It's my first time learning anything from him and it's awesome
Ps:subbed already but permanent now
So changing the width of an element is no a re-render ?
Hello sir, assuming I want to add a value to an input Text by just clicking on element.. please how will I do that please?
I was searching if I could find explanations for other Hooks, I couldn't find it . Could you kindly let me know about that ?
Hi nice explanation about useRef sir! only question I have here is "is it good practice to directly changing the DOM structure through current property of useRef object I mean there must be some react way to manipulate the DOM like Angular has renderer2."
but why input size changed on the screen if changing current value doesn't trigger rerender? i don't understand
Great explanation and example
Hey Hithesh, i really love your videos even i used it to start my ReactJS courses. I created a big web-app which is now in production. But i always get a warning with huge chunk size problem while taking builds. I tried code-splitting in almost every page and corrected many import methods... still its not reducing. How can I find where is this size getting logged up ? Need help sir....😥
Absolutely Beautiful :)
Brilliantly explained !!
excellent video, Could you also explain other hooks such as useMemo and useCallback please ? I cant understand where to use them
thanks a lot.... you made it easy
please a video like this about redux.... what is the use case of redux!
Please make react playlist and clear all the concepts easily 😊
if useRef doesn't re render then why the width get's increased when you click on the button ?
Really needed this video. Thank you.
What does "Store the reference of an element" meains?
sir tagda explanation hain.
What's the difference between createRef and useRef, they should be one?
Excellent explanation .