Why You Need to Understand Re-rendering in React and useState Hook

preview_player
Показать описание
It's important to understand state when developing with React. State can be confusing to understand at first since it only re-renders when the reference to your state changes. This video explains a bug that a subscriber ran into because of not fully understanding how react components re-render.

------------

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

Excellent explanation. You master the subject, understand well it and takes time to explain us. A Very Big Thanks.(and thanks also to the google subtitles because, i do not understand well spoken english). Thanks a lot Web Dev Junkie. Earth needs people like you, very skilled and sharing their skills. Thanks bro.

thomascampos
Автор

This solved my bug! I was working on it for like 3 hours. Thanks man!

CTBell-uyri
Автор

Very good explanation to a really loosely described subject. Nobody uses the term “pointer” any more with these “high-level” languages, but sometimes it is essential to use the right term, if that is exactly what happens behind the scenes. You really threw me a lifeline as I was frustrated with all the unwanted and unexpected renders. This doesn’t solve it all but I will continue with the specifics of “reconciliation” area. Thanks a lot !!! 👏👏👏🧠💪

ulviugur
Автор

I just started a Javascript Bootcamp... im so glad that finally feel comfortable with HTML and CSS (SCSS). Hope your nose is feeling better.

norvisnorvis
Автор

i just want to appreciate the time and effort ! Thanks

iamthatsid
Автор

When I learned react with class components this was the first thing that was known because this.state was an object. But when you see react videos with functional comps it seems that it's overlooked because the examples used is non obj/arr like a counter

Dan_ny
Автор

Thanks man. Actually I am new to react, and I was facing same problem which was reducing my confidence for react, and this video really helped me a lot.

kumarsaurav
Автор

I would like to add an another method also,
For Eg:
const[data, setData]= useState([])
=>If u want to change the setData with its state means(data)
=>Do as follows to re-render the component
setData((prevState : any)=>[...prevState])
=> By doing this It will also re-render the component with updatedData
I hope this will be useful 😃

SR-jomz
Автор

OMG I LOVE YOU I WAS ABOUT TO LOSE MY MIND OVER MY COMPONENTS NOT RERENDERING

tarcisiosurdi
Автор

This was insightful. Have been using new object references for state updates, but never really thought of it in this light.

sanjibdey
Автор

This was more useful than I even expected. Thank you!

borsho
Автор

That made my brain click, thank you very much!

dbirkle
Автор

You're the man! A cool video idea btw would be "actions that cause a functional component to unmount". Cheers, mate.

ozzyfromspace
Автор

Thanks sir. I was also not able to understand the same issue. but now its resolved .

deepshikha
Автор

Finally, someone said it all in one place

qotiii
Автор

Hey man! You just got a new subscribed! Your video was really helpful! I can stop bang my head on the wall! :)

fhkodama
Автор

Thank you so much! Finally i understand how this works and this solved my bug.

achmadakbarirwanda
Автор

Oh man, thank you so much for the tips!!

nithipramesti
Автор

Thank you very much, I lost 2 hours trying to make up a solution, until I found your video🙂

عبدالإلهالزومان-مح
Автор

great content, I just discovered your channel, this is a gem!

AnasHmamouch