#11358·query

solid-query: STRICT_READ_UNTRACKED on Solid 2 — client()/options() read in component body (useMutation, useBaseQuery)

Author: russelgalCreated Sep 1, 2026Updated Sep 4, 2026

Describe the bug

With Solid 2 ([email protected]) and @tanstack/[email protected], every component that calls useMutation (and useQuery) logs a reactivity diagnostic on mount:

[STRICT_READ_UNTRACKED] Reactive value read directly in <UnitCard> will not update.
Move it into a tracking scope (JSX, a memo, or an effect's compute function).
[STRICT_READ_UNTRACKED] repair guide: node_modules/solid-js/skills/reactivity-diagnostics/SKILL.md

Solid 2 ships these diagnostics in dev builds, and they are meant to be actionable: the console is expected to stay clean. Right now a single screen with a handful of mutations produces dozens of them, which drowns out the diagnostics that are about application code.

Cause

The hooks read memos directly in the component body, outside any tracking scope.

packages/solid-query/src/useMutation.ts:

const client = createMemo(() => resolveClient())

const observer = new MutationObserver(client(), options())   // ← read in component body

packages/solid-query/src/useBaseQuery.ts does the same when it creates its observer:

const initialOptions = defaultedOptions()

const [observer, setObserver] = createSignal(
  new Observer(client(), defaultedOptions()),               // ← read in component body
)

Both reads are intentional one-shot initialisations, so the value genuinely does not need to be tracked — which is exactly the case Solid's untrack exists for. Under Solid 1 this was silent; Solid 2 reports it.

Your minimal, reproducible example

Any component calling useMutation reproduces it. The official Solid 2 fullstack template does it out of the box:

https://github.com/solidjs/templates/tree/main/solid-v2/fullstack-tanstack

src/routes/users.$id.tsx calls useMutation; open the page with a dev build of solid-js@2 and the diagnostic appears on every mount.

Steps to reproduce

  1. Use [email protected] with @tanstack/[email protected].
  2. Render any component that calls useMutation (or useQuery).
  3. Watch the browser console on mount.

Expected behavior

No reactivity diagnostics from library code — the initial reads of client() / options() are untracked by design and should say so.

Suggested fix

Wrap the initialisation reads in untrack(...), or move observer creation into a createRenderEffect / memo. A related Solid-specific fix was already made in #10445 (useQueryClient running inside createMemo).

Platform

  • @tanstack/solid-query 6.0.0-rc.1 (latest rc on npm as of 2026-09-01)
  • solid-js 2.0.0-rc.4
  • Chromium 141, macOS

Note

Not filing a PR because I did not want to guess which of the two shapes (untrack vs. deferred observer creation) you prefer for v6 — happy to send one either way.