MarksmithM
tRPC3y ago
1 reply
Marksmith

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
    })


What am I doing wrong?
Was this page helpful?