This hook currently returns { fetchSearchResults, isLoading }. I noticed two things:
- We're using two different verbs to describe the same action: "fetch" and "load"
- The action is verbose but the state is terse
I think we can reconcile these differences and create more symmetry between the action and the state. I suggest erring on the side of verbosity to avoid potential conflicts with the consumer's variables, e.g. a local isLoading variable. I'd suggest { fetchSearchResults, isFetchingSearchResults }.
This hook currently returns
{ fetchSearchResults, isLoading }. I noticed two things:I think we can reconcile these differences and create more symmetry between the action and the state. I suggest erring on the side of verbosity to avoid potential conflicts with the consumer's variables, e.g. a local
isLoadingvariable. I'd suggest{ fetchSearchResults, isFetchingSearchResults }.