ci: changeset release (rc) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
History
|
|
|---|---|---|
| .. | ||
| src | ||
| CHANGELOG.md | ||
| eslint.config.js | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| vite.config.ts | ||
@tanstack/solid-router-ssr-query
Important
Deprecated on the Solid v2 line. Solid 2.0's native channels make this package's transport unnecessary:
QueryClientProviderin@tanstack/solid-queryv6 serializes the request's cache into Solid's hydration registry during SSR and primes the client cache from it — running this package alongside it ships every query payload twice. The two runtime conveniences it bundled are each a few lines of userland composition on public APIs (see the Solid Start e2e apps undere2e/solid-start/): wrap the router tree inQueryClientProvidervia the router'sWrapoption, and hand cache-drivenredirect()errors torouter.navigatefrom the caches'config.onError.
SSR query integration for TanStack Solid Router and TanStack Solid Query.
This package provides seamless integration between TanStack Router and TanStack Query for server-side rendering in Solid applications.
Installation
npm install @tanstack/solid-router-ssr-query
# or
pnpm add @tanstack/solid-router-ssr-query
# or
yarn add @tanstack/solid-router-ssr-query
Usage
import { QueryClient } from '@tanstack/solid-query'
import { createRouter } from '@tanstack/solid-router'
import { setupRouterSsrQueryIntegration } from '@tanstack/solid-router-ssr-query'
const queryClient = new QueryClient()
const router = createRouter({
routeTree,
context: { queryClient },
})
setupRouterSsrQueryIntegration({
router,
queryClient,
})
License
MIT