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

オープン
#8,911 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@brenelz がすでに取り組んでいます。

2026年11月22日 から。

  • #8972 @brenelz による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
57/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
react, typescript
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
15.3k
フォーク
1.9k
平均マージ
1日 5時間
マージ済み PR(30日)
46

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/router のほかの issue

TanStack/router の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。