react-query triggers a re-reneder every X seconds on react native.
My query looks something like this
A simple query, but it is triggering a re-render every x seconds.
Even when looking at the full object react query returns, no property is different. Is there something I am missing?
4 Replies
mute-gold•4y ago
what is
somePromise. I hope it's a function that returns a promise?like-goldOP•4y ago
@TkDodo 🔮 yes, my promise is an axios get
mute-gold•4y ago
that should work except that the error handling is weird because you return a resolved promise, which will make react query not go into error state. are you sure you're not calling
somePromise() directly during render? would need to see a codesandbox reproduction otherwiselike-goldOP•4y ago
yeah, I am not using the promise directly, but I will double check. I will try to set up a codesanbox/expo snack to reproduce it. Thanks for the response c: