0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/packages/solid-router-ssr-query
github-actions[bot] 8ca0beac8a
ci: Version Packages (rc) (#8219)
ci: changeset release (rc)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
History 2026-09-03 22:08:49 +02:00
..
src chore: bump to solid v2 beta 10 (#7284) 2026-04-30 11:33:46 +02:00
CHANGELOG.md ci: Version Packages (rc) (#8219) 2026-09-03 22:08:49 +02:00
eslint.config.js solid-router-ssr-query (#5310) 2025-10-21 00:29:02 +02:00
package.json ci: Version Packages (rc) (#8219) 2026-09-03 22:08:49 +02:00
README.md refactor(solid): retire solid-router-ssr-query — native channels carry the Router + Query pairing (#8193) 2026-09-02 16:34:33 -05:00
tsconfig.build.json chore: merge main to solid v2 (#7105) 2026-04-05 20:56:19 +02:00
tsconfig.json chore: bump to solid v2 beta 10 (#7284) 2026-04-30 11:33:46 +02:00
vite.config.ts Upgrade solidjs rc 0 and rename vite-plugin-solid to @solidjs/vite-plugin 2026-08-12 20:21:16 -05:00

TanStack Solid Router

@tanstack/solid-router-ssr-query

Important

Deprecated on the Solid v2 line. Solid 2.0's native channels make this package's transport unnecessary: QueryClientProvider in @tanstack/solid-query v6 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 under e2e/solid-start/): wrap the router tree in QueryClientProvider via the router's Wrap option, and hand cache-driven redirect() errors to router.navigate from 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