seif-y / PokeBuilder

1 stars 0 forks source link

Refactor fetching to remove duplication and add cleanups #65

Closed Benjamin-Piper closed 3 years ago

Benjamin-Piper commented 3 years ago

In PokeBuilder we use axios almost everywhere either to get information from the PokeAPI or the backend.

It would be nice if we could remove duplicate code by making a useAxios (or should we call it useFetch?) hook to achieve this. This would also mean that we can use cleanups effectively to stop memory leak warnings being printed on the console.

Specifications

This YouTube video looks promising...

seif-y commented 3 years ago

This turned out to introduce a lot of extra complexity, so we've decided to leave it out for now