query
query copied to clipboard
fix(query-core): allow function value of `notifyOnChangeProps` query option to return `undefined`
undefined is a valid return value for the function value of notifyOnChangeProps. See linked issue for more details.
Fixes #7426.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| query | ⬜️ Ignored (Inspect) | Visit Preview | Jun 8, 2024 5:42pm |
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 e28ea029a2f2a77744962a2d5132009a5496eea1:
| Sandbox | Source |
|---|---|
| @tanstack/query-example-angular-basic | Configuration |
| @tanstack/query-example-react-basic-typescript | Configuration |
| @tanstack/query-example-solid-basic-typescript | Configuration |
| @tanstack/query-example-svelte-basic | Configuration |
| @tanstack/query-example-vue-basic | Configuration |
can you amend the signature in the docs as well please?
☁️ Nx Cloud Report
CI is running/has finished running commands for commit 76abb166ed1ae006eeb9f368da747bb12e74129c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 2 targets
Sent with 💌 from NxCloud.
also the jsdoc please:
https://github.com/TanStack/query/blob/3a8c2b10a1c2a3657d22b0304aab640683a4db0f/packages/query-core/src/types.ts#L319-L326
@winghouchan will you get this PR over the finish line or should I do it?
Run & review this pull request in StackBlitz Codeflow.
commit: 76abb16
@tanstack/angular-query-devtools-experimental
npm i https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@7441
@tanstack/angular-query-experimental
npm i https://pkg.pr.new/@tanstack/angular-query-experimental@7441
@tanstack/eslint-plugin-query
npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@7441
@tanstack/query-async-storage-persister
npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@7441
@tanstack/query-broadcast-client-experimental
npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@7441
@tanstack/query-core
npm i https://pkg.pr.new/@tanstack/query-core@7441
@tanstack/query-devtools
npm i https://pkg.pr.new/@tanstack/query-devtools@7441
@tanstack/query-persist-client-core
npm i https://pkg.pr.new/@tanstack/query-persist-client-core@7441
@tanstack/query-sync-storage-persister
npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@7441
@tanstack/react-query
npm i https://pkg.pr.new/@tanstack/react-query@7441
@tanstack/react-query-devtools
npm i https://pkg.pr.new/@tanstack/react-query-devtools@7441
@tanstack/react-query-next-experimental
npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@7441
@tanstack/react-query-persist-client
npm i https://pkg.pr.new/@tanstack/react-query-persist-client@7441
@tanstack/solid-query
npm i https://pkg.pr.new/@tanstack/solid-query@7441
@tanstack/solid-query-devtools
npm i https://pkg.pr.new/@tanstack/solid-query-devtools@7441
@tanstack/solid-query-persist-client
npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@7441
@tanstack/svelte-query
npm i https://pkg.pr.new/@tanstack/svelte-query@7441
@tanstack/svelte-query-devtools
npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@7441
@tanstack/svelte-query-persist-client
npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@7441
@tanstack/vue-query
npm i https://pkg.pr.new/@tanstack/vue-query@7441
@tanstack/vue-query-devtools
npm i https://pkg.pr.new/@tanstack/vue-query-devtools@7441
templates
- @tanstack/query-example-angular-basic
- @tanstack/query-example-angular-infinite-query-with-max-pages
- @tanstack/query-example-angular-router
- @tanstack/query-example-angular-simple
- @tanstack/query-example-react-algolia
- @tanstack/query-example-react-auto-refetching
- @tanstack/query-example-react-basic
- @tanstack/query-example-react-basic-graphql-request
- @tanstack/query-example-react-default-query-function
- @tanstack/query-example-react-infinite-query-with-max-pages
- @tanstack/query-example-react-load-more-infinite-scroll
- @tanstack/query-example-react-nextjs
- @tanstack/query-example-react-nextjs-app-prefetching
- @tanstack/query-example-nextjs-suspense-streaming
- @tanstack/query-example-react-offline
- @tanstack/query-example-react-optimistic-updates-cache
- @tanstack/query-example-react-optimistic-updates-ui
- @tanstack/query-example-react-pagination
- @tanstack/query-example-react-playground
- @tanstack/query-example-react-prefetching
- @tanstack/query-example-react-react-native
- @tanstack/query-example-react-router
- @tanstack/query-example-react-rick-morty
- @tanstack/query-example-react-shadow-dom
- @tanstack/query-example-react-simple
- @tanstack/query-example-react-star-wars
- @tanstack/query-example-react-suspense
- @tanstack/query-example-solid-astro
- @tanstack/query-example-solid-basic
- @tanstack/query-example-solid-basic-graphql-request
- @tanstack/query-example-solid-default-query-function
- @tanstack/query-example-solid-simple
- @tanstack/query-example-solid-start-streaming
- @tanstack/query-example-svelte-auto-refetching
- @tanstack/query-example-svelte-basic
- @tanstack/query-example-svelte-load-more-infinite-scroll
- @tanstack/query-example-svelte-optimistic-updates-typescript
- @tanstack/query-example-svelte-playground
- @tanstack/query-example-svelte-simple
- @tanstack/query-example-svelte-ssr
- @tanstack/query-example-svelte-star-wars
- @tanstack/query-example-vue-2.6-basic
- @tanstack/query-example-vue-2.7-basic
- @tanstack/query-example-vue-basic
- @tanstack/query-example-vue-dependent-queries
- @tanstack/query-example-vue-nuxt3
- @tanstack/query-example-vue-persister
- @tanstack/query-example-vue-simple
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 63.33%. Comparing base (
a87c2fe) to head (22c3569). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #7441 +/- ##
=========================================
+ Coverage 0 63.33% +63.33%
=========================================
Files 0 125 +125
Lines 0 4522 +4522
Branches 0 1259 +1259
=========================================
+ Hits 0 2864 +2864
- Misses 0 1430 +1430
- Partials 0 228 +228
@TkDodo: sorry, missed your messages.
I've updated the signature in documentation in 43f0722. As far as I can tell it only affects React (and Vue, although they share the same docs). Please let me know if this is incorrect.
How would you like the JSDoc updated? The current description isn't wrong, although I suppose it could be improved. Maybe something like below:
- If set to a function, the function will be executed to compute the list of properties.
- If the value is set or computed to
undefined, access to properties will be tracked, and the component will only re-render when one of the tracked properties change. This is the default behaviour.- If the value is set or computed to an array, the component will only re-render if any of the listed properties change. For example, if the value is set to or computed to
['data', 'error'], the component will only re-render when thedataorerrorproperties change.- If the value is set or computed to
"all", the component will opt-out of smart tracking and re-render whenever a query is updated.