DEV Community

Discussion on: How to use componentDidUpdate in React

Collapse
 
geraldryan profile image
Gerald Ryan

I'm still getting used to Javascript. It is different. For example, one says componentDidUpdate() takes two arguments, but to me it's more like it requires you to give names to two objects or things it's already providing, kind of like how in the Neverending Story Bastian just had to give the queen a name. She already existed. He didn't pass her in. Maybe it's like outparameters in C++. You set the parameter, and the values get overwritten. Is that right? These little java script peculiarities throw me for a loop as I try to learn how to code. Once I get a sense of them then I start to accelerate. I don't mean to be controversial.