get-convex / get-convex/convex-react-query

Add examples or helper for infinite/paginated queries (e.g. convexInfiniteQuery) alongside convexQuery

Open
#27 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
41
Forks
7
PR merge metrics
No merged PRs in 30d

Description

In the TanStack Start guide, it is recommended to use `useSuspenseQuery` with the `convexQuery` helper method:

```
import { convexQuery } from "@convex-dev/react-query";
import { useSuspenseQuery } from "@tanstack/react-query";
import { createFileRoute } from "@tanstack/react-router";
import { api } from "../../convex/_generated/api";

export const Route = createFileRoute("/")({
component: Home,
});

function Home() {
const { data } = useSuspenseQuery(convexQuery(api.tasks.get, {}));

return (


{data.map(({ _id, text }) => (
{text}

))}

);
}
```

It would be good to have other examples of common patterns like infinite queries. I see there is a `usePaginatedQuery` in the convex package, but I assume that's not SSR. If there isn't a recommended way, could we get a `convexPaginatedQuery` or `convexInfiniteQuery` helper in this package like `convexQuery`?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.