Skip to content

useMutation: enabled prop #5922

Answered by bazuka5801
bazuka5801 asked this question in Q&A
Discussion options

You must be logged in to vote

I think this may be a solution to the problem:

watch(
  queryClient.isRestoring,
  async (isRestoring) => {
    if (!isRestoring) {
      // Wait auth....
      console.log('Waiting auth for resume paused mutations...')
      await until(isAuthenticated).toBe(true)
      queryClient.resumePausedMutations()
      console.log('Resume', queryClient)
    }
  },
  { immediate: true }
)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bazuka5801
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
2 participants