MCPcopy Create free account
hub / github.com/TanStack/query / Example

Function Example

examples/solid/pagination-solid-start2/src/routes/index.tsx:17–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15import { projectsQueries } from '~/services/projects/queries'
16
17export default function Example() {
18 return (
19 <div>
20 <p>
21 In this example, each page of data remains visible as the next page is
22 fetched. The buttons and capability to proceed to the next page are also
23 suppressed until the next page cursor is known. Each page is cached as a
24 normal query too, so when going to previous pages, you'll see them
25 instantaneously while they are also refetched invisibly in the
26 background.
27 </p>
28 <ErrorBoundary fallback={(error) => <div>Error: {error.message}</div>}>
29 <Projects />
30 </ErrorBoundary>
31 </div>
32 )
33}
34
35function Projects() {
36 const queryClient = useQueryClient()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected