TanStackT
TanStack3y ago
8 replies
moderate-tomato

Same queryFn for multiple useQuery calls?

I am trying out react-query for the first time. Watched a couple tutorials and wow does it seem super cool!! My question is for
useQuery
, if most of my get calls are all basically the same but just call a different backend route, getUsers, getCustomers, getCategories etc., can I just use the same generic function?
Was this page helpful?