useInfiniteQuery
info
- Your procedure needs to accept a input of
any
type - For more details on infinite queries read the react-query docs
- In this example we’re using Prisma - see their docs on
Example React Component
function MyComponent() {
const myQuery = trpc.useInfiniteQuery(
'infinitePosts',
{
},
],
getNextPageParam: (lastPage) => lastPage.nextCursor,
},
);
}