TanStackT
TanStack9mo ago
2 replies
sacred-rose

Is this custom hook correct?

Currently I have this custom hook where it uses React Query, the case, that there are many things that can be improved, plus I have some cases that are missing to add. I'm learning to use React Query but it's getting complicated. If someone could look at the code and review where I should refactor and improve. I had created a generic Custom hook to get the data, but is this the best idea? Or create a custom hook for each use case? I use this with React Native.

https://pastebin.com/wxJwkbLz
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Was this page helpful?