DEV Community

Discussion on: React useEffect fetching API

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.