Returning a function from custom hook with useQuery
I have an api to retrieve a list of todos, and I want to create a helper to retrieve their names.
I ended up doing this:
custom hook:
component:
My question is simple: is it OK to do that? If it isn't, why not?
Thanks
1 Reply
extended-salmon•3y ago
Looks alright