Skip to content

Support skip in useSuspenseQuery #10532

@jerelmiller

Description

@jerelmiller

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:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions