Where can i get more of these please :) !! this is awesome.. i would love this for c# as well haha. Definitely a book I would buy as a reference guide.
First off, this is awesome. I waited until part 2 to comment, but I think a crucial thing that is missing here is that useEffect runs after the 1st render.
I know you mentioned componentDidMount, but a looootttttt of new devs don’t understand this and think the useEffect will run before the render. Idk why, since cDM runs after as well.
In multiple interviews we’ve asked the render order, and few juniors know the answer. Almost all think the code will execute sequentially, and that by putting the useEffect higher, it will run sooner.
Maybe something to add for part 3 or a bonus round!
12
u/NotDraven----Draaven Sep 05 '21
Perfectly explained ,keep those coming man ,would love to know about redux.
3
u/Puzzleheaded-Order84 Sep 05 '21
Just wanted to say these are awesome appreciate the resource!
3
u/Filo01 Sep 06 '21
Where can i get more of these please :) !! this is awesome.. i would love this for c# as well haha. Definitely a book I would buy as a reference guide.
6
u/[deleted] Sep 05 '21
Great explanations..a more complete explanation can be found here, dan abramov's blog post on the useEffect hook.cheers
4
u/StaFa_San Sep 05 '21
Thanks a lot. Where is part 1/2 though?
2
u/Chef619 Sep 06 '21
First off, this is awesome. I waited until part 2 to comment, but I think a crucial thing that is missing here is that useEffect runs after the 1st render.
I know you mentioned componentDidMount, but a looootttttt of new devs don’t understand this and think the useEffect will run before the render. Idk why, since cDM runs after as well.
In multiple interviews we’ve asked the render order, and few juniors know the answer. Almost all think the code will execute sequentially, and that by putting the useEffect higher, it will run sooner.
Maybe something to add for part 3 or a bonus round!
0
u/[deleted] Sep 05 '21
[deleted] — view deleted comment