You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
+page.svelte should not load data from parent +page.server.ts #15397
Lets say I have the following project structure:
If I navigate from the shop page to the product page and then back to the shop page, the product page gets the data from the shop load function before navigation to the shop page.
The product page should not get the load data from the shop page.
I rebuilt this repro's structure and drove the shop → product → shop cycle while watching the console. I can reproduce the reported log output, but only when the pages observe data with $inspect. With $inspect('product', data) in each page I get exactly the reported pattern on kit 2.53.0 + svelte 5.53.3, kit 2.70.0 + svelte 5.56.5, and kit 3.0.0-next:
to product:
shop {load: [product]} <- outgoing page
product {load: [product]}
back to shop:
product {load: shop} <- outgoing page
shop {load: shop}
$effect, $effect.pre, effect cleanup at destroy time, template reads of route-specific nested data, legacy $:, and page.data from $app/state never see the other route's data on the same versions, in either direction.
During navigation the new data is written while the old component is still mounted, and the data swap plus component swap commit in a single flush. Ordinary reactivity never observes the intermediate state. $inspect does because inspect effects intentionally run synchronously at mutation time, which is what lets $inspect(...).with(console.trace) point at the code that caused a change.
The variants of this that could break real code were fixed separately. Blur handlers running after the data update (#14575, #13276) were fixed by #15452 in kit 2.66.0, and #12851's template TypeError no longer reproduces on current Svelte.
So unless you were seeing this with something other than $inspect, I don't think there's a kit bug left here. Making $inspect skip components that are about to be destroyed would be a sveltejs/svelte question.
Activity
Nic-Polumeyv commentedon Jul 17, 2026
I rebuilt this repro's structure and drove the shop → product → shop cycle while watching the console. I can reproduce the reported log output, but only when the pages observe
datawith$inspect. With$inspect('product', data)in each page I get exactly the reported pattern on kit 2.53.0 + svelte 5.53.3, kit 2.70.0 + svelte 5.56.5, and kit 3.0.0-next:$effect,$effect.pre, effect cleanup at destroy time, template reads of route-specific nested data, legacy$:, andpage.datafrom$app/statenever see the other route's data on the same versions, in either direction.During navigation the new data is written while the old component is still mounted, and the data swap plus component swap commit in a single flush. Ordinary reactivity never observes the intermediate state.
$inspectdoes because inspect effects intentionally run synchronously at mutation time, which is what lets$inspect(...).with(console.trace)point at the code that caused a change.The variants of this that could break real code were fixed separately. Blur handlers running after the data update (#14575, #13276) were fixed by #15452 in kit 2.66.0, and #12851's template TypeError no longer reproduces on current Svelte.
So unless you were seeing this with something other than
$inspect, I don't think there's a kit bug left here. Making$inspectskip components that are about to be destroyed would be a sveltejs/svelte question.