Manipulating the DOM In ReactJS | useRef
Вставка
- Опубліковано 3 жов 2024
- Best Tech Resume Template: papermoontech....
Use code: PEDRO for 20% off ^
In this video I will talk about some good practices in react and go over why manipulating the DOM (Document Object Model) directly is not a good idea. However, in the cases where we have to, I am showing you guys how to use the useRef hook to make it work.
-
🚀 Learn ReactJS By Building 6 Projects: codedamn.com/l...
💻 PedroTech Discord: / discord
-
Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Website: machadopedro.com
Twitter: / pedrotech_
Linkedin: / machadop1407
Instagram: / _pedro.machado_
Github: github.com/mac...
Email: machadop1407@gmail.com
Tags:
DOM
Fetch
ReactJS Tutorial
ReactJS and MySQL
NodeJS Tutorial
API Tutorial
I’m a newbie in react i was actually trying so many ways to manipulate a jsx element when a button is click. I’ve struggled with that for hours. Didn’t know it’s basically using “useRef”. Thanks so much i achieved so mucu from your videos
I hope now u r pro
I was waiting for you to show more in-depth stuff like how to change the innerHTML, using datasets and more.
I don't really need to manipulate the DOM, but need to get a value from a hidden input, so watching this tutorial to see if useRef is that what i need :)
Simple as that, I am a beginner in React and that's what I am looking for two weeks. You are great. Love From Pakistan ❤️❤️
Love my Pakistani subs :)
Searching how to make the scroll slower on my website I figured out this awesome channel. You are doing a great job, Pedro.
Btw, your name is very common here in Brazil, so I was wondering where you from
Sou br kkkkkkk Meu nome é bem comum mesmo! Fico feliz que está gostando dos videos!
@@PedroTechnologies Inglês impecável hein mano, nem consegui reparar o sotaque
Wow very useful, you saved my IT career bro
man, finally i found the tutorial that really useful, big thanks
The intro is smooth🔥
hahaha I really liked it!
Really great explained, I am becoming your fan slowly, keep it up
Great explanation Pedro, thanks for sharing 👍.
Glad you liked it!
this is it what I am waiting for.....❤️❤️❤️
Glad you liked it!
Great work pedro.
Been looking for useRef tut and yours cleared my confusion. thank you!
This is the video I am searching for... Thanks sir.. 😊
Great video! Simple example and easy to understand. TY!!
thank you very muchhhh. I got it finally
So simply explained. Very good video.
Glad you think so!
Thank you so much.. really helpful tutorial
Nice explanation!
Need more on dom manipulation
amazing video pedroski!
Thank you colin!
Believe it or not man, you are very inspiring in terms of productivity.
I was able to study different stuffs before getting a job but now after getting one, I am just not able to find time.
How do you manage to do all of these (UA-cam, job, studies and college)?
Help me out brother😅
Hahaha thank you so much bro! The past year has been the most productive to me, I can make a video on how I structure my day hahaha. I work from 7 am to about 9pm so I get enough time for everything!
@@PedroTechnologies Really cool man!
Please do a video on that 👍
useful tutorial. Thank you!
Glad you enjoyed it!
this helped me solve my issue thank you @PedroTech
Thanks brother , it was really helpful.
your videos are very helpful i appreciate it
Hey so is there any point of learning the DOM if it isnt supposed to be used in React?? Thank you
It is useful for many other libraries, and it always good to know. But for react, I would say no.
Thank you so much sir 🤩
Amazing video! Thanks for the great work :-)
Thank you so much ❤️
your video is awesome and very explantory keep doing it
Thanks a lot!
my god I love you tysm!!!!
Outro vídeo que está me salvando
Fico feliz!
Vlw cara, vc me ajudou bastante, belo video.
how did you manage to draw a circle with border-radius:100%
Thank you pedro is helpfull alot
What's your VS Code theme ?
I use the palenight theme!
Awesome bro 😎👍
Thank you! Cheers!
Awesome...thank you
thanks so much
are you from brazil?
Pelo sotaque parece mto kkkkk
Thankssss
Useref is very important
too bad the video didn't really explain why manipulating the DOM is bad or show an example
Manipulating the dom is not bad, its just against what react preaches. In react, your UI should be altered depending on the state of the application, and not manually by editing its elements. I should've made it clearer, thank you for the feedback :)
Awesome
I always get confused between "useRef" and "CreateRef" ....🤣
Hahaha no worries, useRef is the hook and create ref just creates a reference to an element
Dude, how did you learn English?
love from pakistan
massa hein
Obrigado!
@@PedroTechnologies Tu é Br? Inglês impecável
thank fuck not a video showing us how to get input to focus
Holy shit - you can cut 50% of that video - stop talking in circles