feat(useQuery): add meta field#2818
feat(useQuery): add meta field#2818TkDodo merged 13 commits intoTanStack:masterfrom zaguiini:feature/meta-field-on-query
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
|
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
|
Thanks for the thorough review, @TkDodo. On to the next -- and hopefully, last -- round of feedback! |
|
🎉 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):