Cancel the fetch if it has not been completed and props changed
You can read about the AbortController here: https://developer.mozilla.org/en-US/docs/Web/API/AbortController
That may not always be desirable behavior, so I'm unsure about doing it by default.
This is mostly an issue of how does it know which request to cancel. Functional components do not have instances, so I can't say "cancel this Component's last request."
I explained poorly. By props I meant arguments to useFetch
Oh wait, I understand what you are saying. I see the problem now. You can probably use hooks to help solve that though.
@CharlesStover you can useRef to store abort controllers. Maybe take a look at https://github.com/mauricedb/use-abortable-fetch for inspiration.
Heck you could even use that hook under the covers.