Sign in
Log inSign up
David Herbert

73 likes

·

1.8K reads

9 comments

Samuel Jarvis Adeyemi
Samuel Jarvis Adeyemi
Jun 15, 2022

Wonderful article David. This helped me to really understand how the useEffect hook really works.

3
·
·3 replies
David Herbert
David Herbert
Author
·Jun 16, 2022

Thanks, Jarvis! I'm glad you found it helpful.

·
Omar Saade
Omar Saade
Jun 16, 2022

David Herbert Good Job

2
·
David Herbert
David Herbert
Author
·Jun 16, 2022

Thanks Omarsaade :)

1
·
Favourite Jome
Favourite Jome
Jun 16, 2022

Wonderfully explain David!

Funny! I encountered the same re-rendering issue while making a fetch call outside of a useEffect hook recently, I went ahead throwing the memo function in the component, but that didn't solve the re-rendering issue.

Then after some time, I noticed the fetch call was outside a useEffect hook 😂, what a bug I spent some time trying to figure out what was wrong.

Thanks for sharing!

3
·
·1 reply
David Herbert
David Herbert
Author
·Jun 17, 2022

Lol! We have all been there, myself included. Glad you found it helpful.

1
·
Developer Avocado
Developer Avocado
Jun 15, 2022

Thanks for explanation 👍

2
·
·1 reply
David Herbert
David Herbert
Author
·Jun 16, 2022

You're welcome :)

·
Oussama Moutafatin
Oussama Moutafatin
Jun 16, 2022

What about the new behavior of useEffect in React 18

·