Skip to content

Release candidate - #16

Merged
monarcode merged 10 commits into
mainfrom
feat/tanstack-router
Nov 1, 2026
Merged

monarcode merged 10 commits into
mainfrom
feat/tanstack-router

Conversation

@monarcode

Copy link
Copy Markdown
Owner
  • feat(react): add TanStack Router and Start integration
  • feat(client): accept a ManagedRuntime in QueryClient.make
  • fix(tanstack-router): leave awaited redirects to the loader and harden SSR
  • feat(react): Next.js App Router recipe, digest rethrow and hydration fixes
  • feat(react): React Router recipe, and revert the digest rethrow
  • feat(client): add QueryClient.disposeAfter
  • refactor!: adopt Effect 4 naming ahead of the API freeze
  • docs(readme): rewrite around effetch with a step-by-step start
  • feat(examples): basic, TanStack Start (with and without effetch) and React Router apps on dummyjson
  • chore(release): 0.1.0-rc.0

- Add `connectQueryClient` at `@monarcode/effetch-query/react/tanstack-router`,
  which streams server-loaded queries to the browser and follows `redirect()`
  from queries and mutations
- Let `dehydrate` skip queries an earlier batch already sent
- Add a TanStack Start example and test, and `@tanstack/react-router` as an
  optional peer
- Add a `runtime` option, an alternative to `layer`, that uses the runtime's
  services and Reactivity and leaves it running on `dispose`
- Split `Options` into `LayerOptions`, `RuntimeOptions` and `CommonOptions`, so
  a `layer` or `memoMap` with a `runtime` is a compile error
- Update the README, SSR and TanStack Start examples to share one runtime per
  process
…n SSR

- Skip the redirect for a fetch an Effect awaits, such as a loader's
  `Query.fetch`, so the router follows it and a preload drops it
- Fetch queries whose streamed result never arrives once the page has loaded
- Send a query that replaced one an earlier batch sent, and report a failed
  request-client disposal instead of leaving it unhandled
…fixes

- README: a Next.js App Router recipe with the core and ./react, no
  integration package: getQueryClient with React's cache() and Next's
  after(), a QueryProvider for client components, streaming with
  pending: "promise".
- useSuspenseQuery and useSuspenseInfiniteQuery throw an error with a
  string digest (Next's redirect() and notFound()) as it is, rather than
  in a QueryFailure.
- Fix: a hydrated query is no longer refetched when React hydrates in
  slices. React's server snapshot no longer seeds an unobserved fetch
  atom that the registry dropped before React subscribed.
- Fix: streamed results accept a thenable whose then returns nothing, as
  React's RSC client hands over, without unhandled rejections.
- Smoke test loads the core with the react-server condition.
- README: a React Router framework-mode recipe with the core and
  ./react, no integration package: a root middleware makes each
  request's client and disposes it once the response body is sent,
  loaders return the dehydrated state for a HydrationBoundary, and
  entry.server.tsx renders with the request's client.
- Revert: suspense hooks wrap every failure in a QueryFailure again.
  React Router uses digest only in its unstable RSC mode, so the
  rethrow served Next alone.
- README: start streamed prefetches with runPromiseExit, which never
  rejects, so a prefetch cut short by disposal isn't an unhandled
  rejection; examples/tanstack-start follows.
- Test the recipe through react-router's createRequestHandler.
QueryClient.disposeAfter(client, response) returns the response with its
body wrapped so the client is disposed once the body has been sent,
fails or is cancelled; a response with no body disposes it at once, and
a failed dispose is logged rather than thrown. It's for a client per
request on a server that answers with a streamed Response: React
Router's middleware, Hono, Bun.serve, Deno.serve.

- The README's React Router recipe uses it, so its middleware is three
  lines instead of a hand-written stream wrapper.
- connectQueryClient's cleanup shares its dispose logging.
Query.Key/Target/Family/Schema, InfiniteQuery.Family/Schema, TypeId
exports, Error-suffixed defects, and Mutation.isMutation.
- Explain why effetch-query exists, how it works and how it relates to TanStack
  Query
- Build every example on effetch endpoints, and add a "Without effetch" section
  for queries over any Effect
- Mark the release as a release candidate and note the rewrite in the changelog
…React

Router apps on dummyjson

Replace the todos, ssr and tanstack-start examples with four on
dummyjson.com's todos and auth APIs, with a shared UI. The examples are
plain code; test/examples builds the Start and React Router apps and
tests them end to end.
Freeze the API (AGENTS.md rule 9), test against effect and
@effect/atom-react 4.1.1, and turn Unreleased into the 0.1.0-rc.0
changelog section.
@monarcode monarcode changed the title feat/tanstack router Release candidate Nov 1, 2026
@monarcode
monarcode merged commit bb4772f into main Nov 1, 2026
3 checks passed
@monarcode
monarcode deleted the feat/tanstack-router branch November 1, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant