gdirk07 / PokemonChecker

Playing around with APIs
https://gdirk07.github.io/PokemonChecker/
0 stars 0 forks source link

App repeatedly requests data it already has #73

Closed jeremy-jtlo closed 2 years ago

jeremy-jtlo commented 2 years ago

Noticed after merging the last few PRs, but I think converting the pokemon display to a function component may have caused a performance issue. image

I believe this is caused by our use of the useEffect hook, which triggers every time a dependency is updated. If no dependency is provided, it will update every time its component re-renders.

This provides us with 2 issues:

I think this is a pretty big bug worthy of tackling ASAP.