TanStackT
TanStack3y ago
2 replies
radical-lime

V5: Using useSuspenseQueries with enabled = false

I've seen some comments here and there about how
enabled
is not supported by
useSuspenseQuery
(though nothing is documented in migration guide). I was wondering how one might migrate from using useQueries with suspense=true, and some queries being conditional to the new
useSuspenseQueries
.

V4


const [query1, query2] =
    useQueries({
      queries: [
        { ...query1Options, suspense: true },
        { ...query2Options, enabled: someCondition, suspense: true }
      ],
    });
Was this page helpful?