examples/solid/shadow-dom
| Name | Last commit message | Last commit date |
|---|---|---|
| .. | ||
README.md
TanStack Solid Query Shadow DOM Example#
Renders the app and the devtools inside a shadow root.
How it works#
src/services/dogs/queries.tsdefinesdogsQueries.list()withqueryOptions, keyed by['dogs', 'list'], andsrc/services/dogs/api.tsfetches the breed list from the Dog CEO API.src/DogList.tsxreads the breeds withuseQueryand renders one row per breed.src/index.tsxattaches a shadow root to#rootand renders the app into it. It passes the same shadow root toSolidQueryDevtoolsasshadowDOMTarget, so the devtools styles are injected inside the shadow root.
To run this example:
npm installnpm run dev