Skip to content

useMutation isError state doesn't change when there is no internet connection #3334

Answered by TkDodo
KuzmanTheDev asked this question in Q&A
Discussion options

You must be logged in to vote

I expect the mutation to fail with no internet connection and hence update the isError state to true and turn isLoading to false.

have you turned on retries for mutations? Because without retries (the default), offline mutations would just error as you'd expect.

With retries, mutations will be paused and the isPaused flag will be set to true. mutations will then resume automatically once you have regained internet connection.

However, please keep in mind that better offline support if our flagship feature for v4, which is currently in alpha. You can read about it here:

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@KuzmanTheDev
Comment options

@TkDodo
Comment options

@KuzmanTheDev
Comment options

@TkDodo
Comment options

@KuzmanTheDev
Comment options

Answer selected by KuzmanTheDev
Comment options

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

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants