Open History to see the last commit
1# TanStack Solid Query Shadow DOM Example
2β
3Renders the app and the devtools inside a shadow root.
4β
5## How it works
6β
7- `src/services/dogs/queries.ts` defines `dogsQueries.list()` with `queryOptions`, keyed by `['dogs', 'list']`, and `src/services/dogs/api.ts` fetches the breed list from the Dog CEO API.
8- `src/DogList.tsx` reads the breeds with `useQuery` and renders one row per breed.
9- `src/index.tsx` attaches a shadow root to `#root` and renders the app into it. It passes the same shadow root to `SolidQueryDevtools` as `shadowDOMTarget`, so the devtools styles are injected inside the shadow root.
10β
11To run this example:
12β
13- `npm install`
14- `npm run dev`