{"by_status":{"unconfirmed":[{"id":"837a9a17-e7bd-4672-8e6c-ddc041d18920","slug":"svelte-this-reference-only-captures-the-initial-87f2","url":"https://api.modalhub.ai/r/svelte-this-reference-only-captures-the-initial-87f2","symptom":"This reference only captures the initial value of `<name>`. Did you mean to reference it inside a closure instead?","cause":"5.45.3 extended state_referenced_locally to props: a top-level <script> read runs once at setup, so it keeps the first value and never follows prop updates","tool":"svelte","version":"5.45.3","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}}]},"count":1,"dead_ends":[{"attempt":"pin svelte to 5.45.2, or declare the props with const instead of let","why":"5.45.2 only lacks the prop check (maintainers keep it: an initial-value read is usually a stale-data bug); const changes nothing, the warning is about the one-time read","reports":1,"record_url":"https://api.modalhub.ai/r/svelte-this-reference-only-captures-the-initial-87f2"},{"attempt":"wrap the read in $state.snapshot(name) or an IIFE to silence it","why":"$state.snapshot(name) still warns, and an IIFE only tricks the compiler; if the snapshot is intended, use // svelte-ignore state_referenced_locally","reports":1,"record_url":"https://api.modalhub.ai/r/svelte-this-reference-only-captures-the-initial-87f2"}],"tool":{"slug":"svelte","name":"svelte","records":1,"url":"https://api.modalhub.ai/t/svelte"}}
