Describe the bug
When a page uses both data from a route param and an awaited remote query derived from that same param, navigating between instances of the route briefly exposes an inconsistent state: data.symbol already reflects the new
route, while the awaited query result still holds the value from the previous navigation. This produces transient UI glitches and, in keyed {#each} blocks, triggers each_key_duplicate.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-gzoodfhc?embed=1&file=src%2Froutes%2Fsym-%5Bsymbol%5D%2F%2Bpage.svelte
Steps:
- Click the
AAPL link.
- Click the
MSFT link.
- Open the console.
Logs
Logging `allSymbols` during the transition:
['MSFT', 'AAPL', 'GOOGL', 'AMZN'] // initial
['AAPL', 'AAPL', 'GOOGL', 'AMZN'] // intermediate — new data.symbol + stale peers
['AAPL', 'MSFT', 'GOOGL', 'AMZN'] // final
And the runtime warning:
Uncaught Svelte error: each_key_duplicate
Keyed each block has duplicate key `AAPL` at indexes 0 and 1
System Info
Severity
annoyance
Additional Information
No response
Describe the bug
When a page uses both
datafrom a route param and an awaited remote query derived from that same param, navigating between instances of the route briefly exposes an inconsistent state:data.symbolalready reflects the newroute, while the awaited query result still holds the value from the previous navigation. This produces transient UI glitches and, in keyed
{#each}blocks, triggerseach_key_duplicate.Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-gzoodfhc?embed=1&file=src%2Froutes%2Fsym-%5Bsymbol%5D%2F%2Bpage.svelte
Steps:
AAPLlink.MSFTlink.Logs
System Info
Severity
annoyance
Additional Information
No response