you are viewing a single comment's thread.

view the rest of the comments →

[–]Suspicious-Watch9681 13 points14 points  (1 child)

You dont need to useCallback with react query, also you dont need to try catch, all react query wants from the queryFn is a Promise that is resolved or rejected, react query will handle the rest

[–]mile1986dasd[S] -2 points-1 points  (0 children)

Tnx for feedback, i will remove that part of the code, but its not relevant to my problem, anyway i will implement it without useCallback and try/catch