Skip to content

Conversation

@TkDodo
Copy link
Collaborator

@TkDodo TkDodo commented Jun 25, 2021

adds an onSuccess callback on the queryCache and mutationCache, similar to the onError callback, which will only be called once per query, as opposed to once per observer. Can be used for side-effects that should only run once per query.

TkDodo added 3 commits June 25, 2021 10:12
add onSuccess callback to queryCache
add onSuccess callback to mutationCache
docs for the new callback
@vercel
Copy link

vercel bot commented Jun 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-query/AArtpVjAVR8uFFScMAsm8JyVQNeC
✅ Preview: https://react-query-git-fork-tkdodo-feature-queryc-61ec04-tannerlinsley.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 25, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit daee919:

Sandbox Source
tannerlinsley/react-query: basic Configuration
tannerlinsley/react-query: basic-typescript Configuration

don't use italic to emphasize, we don't do that anywhere else in the docs
@TkDodo TkDodo merged commit e6da990 into TanStack:master Jul 16, 2021
@TkDodo TkDodo deleted the feature/querycache-onsuccess branch July 16, 2021 10:55
@tannerlinsley
Copy link
Member

🎉 This PR is included in version 3.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants