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

Abierto
#8,911 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@brenelz ya está trabajando en esto.

Desde el 22/11/2026.

  • #8972 de @brenelz — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
57/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
react, typescript
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
15.3k
Forks
1.9k
Merge medio
1 d 5 h
PR fusionados (30 d)
46

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TanStack/router

Todos los issues de TanStack/router

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.