I have extracted some code for making API requests into a React custom hook in order to reduce repeated code. However there is still one instance where I am unsure how to us