Custom hook in react query for managing data logics #4102
Unanswered
rajivchaulagain
asked this question in
Q&A
Replies: 1 comment
-
sure, creating custom hooks is a good abstraction. Just be aware that if you only need one of the two hooks, they would still both be executed. I would probably make a separate If they are always used together, then why is it two separate queries 😅 ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone I am using react-query and it is very good library.So I need an suggestion as I want to separate UI layer and data fetching , data logics.
so for that I think creating custom hook would be a great idea and I created something like this
Is this right approach???
Beta Was this translation helpful? Give feedback.
All reactions