Skip to content
Discussion options

You must be logged in to vote

If the screen still exists after navigating (e.g. because we push a new screen on the stack but the old one still exists), will the query continue running?

yes

If the screen no longer exists after navigating (e.g. because we pop it from the stack), will the query continue running?

yes, unless you use query cancellation.

If the query continues running, will the callbacks for e.g. onSuccess still be invoked? (Of course we need to make sure that these callbacks don't refer to any state owned by the screen that no longer exists).

callbacks are tied to the react lifecycle. If the component is mounted, they will be called, otherwise not. Mutations are different (but that wasn't the question)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by tibbe
Comment options

You must be logged in to vote
1 reply
@TkDodo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants