Open History to see the last commit
1# TanStack Lit Query Simple Example
2β
3Fetches a single GitHub repository and shows its stats.
4β
5## How it works
6β
7- `src/services/repos/queries.ts` defines `reposQueries.detail()`, a `queryOptions` factory keyed by `['repos', 'detail']` that fetches the TanStack Query repository from the GitHub API.
8- `src/main.ts` passes it to `createQueryController` in `<simple-example>` and shows the repository's name, description, and counts, with "Updating..." while `isFetching` is `true`.
9- `src/main.ts` also subclasses `QueryClientProvider` to set the `QueryClient` for the elements inside it.
10β
11To run this example:
12β
13- `npm install`
14- `npm run dev`