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

Support skip in useSuspenseQuery #10532

Closed
jerelmiller opened this issue Feb 8, 2023 · 3 comments
Closed

Support skip in useSuspenseQuery #10532

jerelmiller opened this issue Feb 8, 2023 · 3 comments
Assignees
Milestone

Comments

@jerelmiller
Copy link
Member

jerelmiller commented Feb 8, 2023

useSuspenseQuery was released in v3.8.0-alpha versions with a limited API surface area. We've received feedback that there is a need for the skip option to conditionally avoid running the query.

Summary of changes

  • Add an optional skip option to the useSuspenseQuery options
  • Set the return type of data to TData | undefined when skip is present in options.
  • When skip is present, only suspend when skip is false.

Feedback:

@jerelmiller
Copy link
Member Author

Finished in #10940

@hbriese
Copy link

hbriese commented Jun 16, 2023

For anyone else waiting for this it looks like it will be included in the upcoming 3.8.0-beta.4 release

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants