examples/lit/simple
| Name | Last commit message | Last commit date |
|---|---|---|
| .. | ||
README.md
TanStack Lit Query Simple Example#
Fetches a single GitHub repository and shows its stats.
How it works#
src/services/repos/queries.tsdefinesreposQueries.detail(), aqueryOptionsfactory keyed by['repos', 'detail']that fetches the TanStack Query repository from the GitHub API.src/main.tspasses it tocreateQueryControllerin<simple-example>and shows the repository's name, description, and counts, with "Updating..." whileisFetchingistrue.src/main.tsalso subclassesQueryClientProviderto set theQueryClientfor the elements inside it.
To run this example:
npm installnpm run dev