T
TanStack•6mo ago
exotic-emerald

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
Custom Hook React Query - Pastebin.com
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.
2 Replies
gradual-turquoise
gradual-turquoise•6mo ago
Your hook seems to be doing so many things, I had to run 😅
exotic-emerald
exotic-emeraldOP•6mo ago
What should I do then?

Did you find this page helpful?