Skip to content
Discussion options

You must be logged in to vote

I think one way to do this in user-land is to setup a global subscription to the QueryCache, then act on the passed action:

React.useEffect(() => {
  return queryClient.getQueryCache().subscribe(event => {
    if (event.type === 'updated' && event.action.type === 'pause') {
      showToast()
    }
  })
}, [queryClient])

Replies: 2 comments 1 reply

Comment options

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

Answer selected by alexanderdavide
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
3 participants