DEV Community

Discussion on: React useEffect fetching API

Collapse
shubhamtiwari909 profile image
ShubhamTiwari909 Author

I am still learning so don't know much about in detail for now

Collapse
lukeshiru profile image
LUKESHIRU • Edited

You just have to remove the [todos] in useEffect (leaving only []) and then the fetch will only run in the first render of the component.

Collapse
rbluena profile image
Rabii Luena

I admire you on the fact that you are still learning but you still want to each others from what you have learned so far. That is a winning attitude right there. I wanted to help but LUKE already did.

Thanks for sharing.

Thread Thread
shubhamtiwari909 profile image
ShubhamTiwari909 Author

Thank you