Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(query-core): allow function value of notifyOnChangeProps query option to return undefined #7441

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

winghouchan
Copy link

undefined is a valid return value for the function value of notifyOnChangeProps. See linked issue for more details.

Fixes #7426.

…option to return `undefined`

`undefined` is a valid return value for the function value of `notifyOnChangeProps`. See linked issue for more details.

Fixes TanStack#7426.
Copy link

vercel bot commented May 16, 2024

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 May 23, 2024 6:51am

Copy link

codesandbox-ci bot commented May 16, 2024

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
Copy link
Collaborator

TkDodo commented May 16, 2024

can you amend the signature in the docs as well please?

Copy link

nx-cloud bot commented May 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 347c4d4. 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


🟥 Failed Commands
nx run-many --targets=test:format,test:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build,test:attw --parallel=3
✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@TkDodo
Copy link
Collaborator

TkDodo commented May 16, 2024

also the jsdoc please:

/**
* If set, the component will only re-render if any of the listed properties change.
* When set to `['data', 'error']`, the component will only re-render when the `data` or `error` properties change.
* When set to `'all'`, the component will re-render whenever a query is updated.
* When set to a function, the function will be executed to compute the list of properties.
* By default, access to properties will be tracked, and the component will only re-render when one of the tracked properties change.
*/
notifyOnChangeProps?: NotifyOnChangeProps

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

Successfully merging this pull request may close these issues.

Function passed to notifyOnChangeProps cannot return undefined
2 participants