0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
query/docs/framework/react/reference/useSuspenseQueries.md
2024-01-26 19:53:40 +11:00

817 B

id title
useSuspenseQueries useSuspenseQueries
const result = useSuspenseQueries(options)

Options

The same as for useQueries, except that each query can't have:

  • suspense
  • throwOnError
  • enabled
  • placeholderData

Returns

Same structure as useQueries, except that for each query:

  • data is guaranteed to be defined
  • isPlaceholderData is missing
  • status is always success
    • the derived flags are set accordingly.

Caveat

Keep in mind that the component will only re-mount after all queries have finished loading. Hence, if a query has gone stale in the time it took for all the queries to complete, it will be fetched again at re-mount. To avoid this, make sure to set a high enough staleTime.