Uh oh!
There was an error while loading. Please reload this page.
feat(useQuery): add meta field - #2818
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/tanstack/react-query/6DGpHYWBTprMYnqWwdxRd7dg7UEY |
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. |
TkDodo
left a comment
There was a problem hiding this comment.
- please also add some tests that use
meta - we've also discussed that the
metashould be part of thequeryFnContext,e.g.:
https://github.com/tannerlinsley/react-query/blob/e6da990703482cff8ea99f5a254975cb57463ed5/src/core/query.ts#L387-L391
so that you can access it from within the queryFn, and generally everywhere where the context is available. This should also be documented then please
Uh oh!
There was an error while loading. Please reload this page.
zaguiini
commented
Oct 25, 2021
Thanks for the feedback, @TkDodo! Please take a second look. |
TkDodo
left a comment
There was a problem hiding this comment.
looking good, please have a look at one more finding
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
zaguiini
commented
Oct 26, 2021
Thanks for the thorough review, @TkDodo. On to the next -- and hopefully, last -- round of feedback! |
tannerlinsley
commented
Oct 26, 2021
🎉 This PR is included in version 3.29.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In these PR's we've introduced the persistance of react query using IndexDB. - #56828 - #68187 To avoid this persiting a query we need to add a meta property `persist: false` that was introduced on React Query by @zaguiini in TanStack/query#2818
In these PR's we've introduced the persistance of react query using IndexDB. - #56828 - #68187 To avoid this persiting a query we need to add a meta property `persist: false` that was introduced on React Query by @zaguiini in TanStack/query#2818
Closes #2772.
Usage example (parts of the code omitted for brevity):