Marksmith
Marksmith2y ago

Does "enabled" in useInfiniteQuery work?

I am trying to prevent the hook to fetch data using "enabled" parameter. It works in useQuery, but useInfiniteQuery tried to load the data anyway.
const {data} = trpc.testRouter.testInfiniteQuery.useInfiniteQuery({
test: true,
}, {
enabled: false
})
const {data} = trpc.testRouter.testInfiniteQuery.useInfiniteQuery({
test: true,
}, {
enabled: false
})
What am I doing wrong?
0 Replies
No replies yetBe the first to reply to this messageJoin