solid-router: <Link> logs STRICT_READ_UNTRACKED warnings under Solid 2 when its options are spread from a <For> item

Aperta
#8,911 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@brenelz ci sta già lavorando.

Dal 22/11/2026.

  • #8972 di @brenelz — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Start in useLinkProps and link.tsx, which the issue identifies as likely places where props are read outside a tracking scope. Reproduce the warning with the supplied minimal reproducer using Solid 2 and options spread from a <For> item, then trace how those props are read in the component and effect callback. Done when the library no longer emits the reported warnings for reactive link options.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

package: solid-router
Which project does this relate to?

Solid Router (@tanstack/solid-router)

Describe the bug

With Solid 2, a <Link> whose options come from a spread of a value read from a <For> item logs two dev-only STRICT_READ_UNTRACKED warnings:

[STRICT_READ_UNTRACKED] Reactive value "merge" read directly in <Link> will not update. Move it into a tracking scope (JSX, a memo, or an effect's compute function).
[STRICT_READ_UNTRACKED] Reactive value "merge" read directly in an effect callback will not update. Move it into a tracking scope (JSX, a memo, or an effect's compute function).
<For each={items}>{item => <Link {...item.linkOptions}>{item.label}</Link>}</For>

The same <Link> outside <For>, spreading a plain object, logs nothing. So <Link> (useLinkProps/link.tsx) appears to read its props in the component body or an effect callback outside a tracking scope, which only shows up when those props are reactive. The warning says the value will not update, so reactive link options may go stale. I have not found a user-visible effect yet. The warnings also appear in rc.9.

Complete minimal reproducer

https://github.com/stephenlautier/solid-router-link-strict-read-repro

Steps to Reproduce the Bug
  1. pnpm install && pnpm dev
  2. Open the printed local URL.
  3. Check the browser console.
Expected behavior

No STRICT_READ_UNTRACKED warnings from library code.

Platform
  • @tanstack/solid-router 2.0.0-rc.10, @tanstack/solid-start 2.0.0-rc.10
  • solid-js / @solidjs/web 2.0.0-rc.21, vite-plugin-solid 3.0.0-next.27
  • Vite 8.3.6, Node 24, Chromium, dev server only (Solid's diagnostics are not in production builds)
Additional context

I searched this repo's issues for STRICT_READ_UNTRACKED and found none.

Lingua principale
TypeScript
Stelle
15.3k
Fork
1.9k
Merge medio
1g 5h
PR unite (30g)
46

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/router

Tutte le issue di TanStack/router

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.