Skip to content

Conversation

@boschni
Copy link
Collaborator

@boschni boschni commented Aug 14, 2020

This MR addresses a few things:

  • Replace QueryInstance with QueryObserver. The purpose of this entity is to observe a query while having the ability to switch to different queries.
  • Add keepPreviousData query option to keep any previous data while loading new data when the query key changes. Would it be an idea to deprecate the resolvedData and latestData properties?
  • Make sure a query is refetched on windows focus when any observer indicates if it should be refetched.
  • Make sure when a user calls a refetch/clear/fetchMore hook callback, the configuration from that specific hook is used.
  • Some preparation work to allow configuration to be a single object.

@vercel
Copy link

vercel bot commented Aug 14, 2020

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/kxk22gevt
✅ Preview: https://react-query-git-fork-boschni-feature-query-observer.tannerlinsley.vercel.app

@tannerlinsley
Copy link
Collaborator

🎉 This PR is included in version 2.7.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