-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
Describe the bug
I'm getting weird reactivity problems in my project that I can't seem to replicate on stackblitz.
But the main issue is that calling the goto() function that only changes the search params of the URL will trigger the $effect on the tags variable.
First of all, this should not happen.
But even weirder is that the group variable doesn't change.
Even tho group is the only dependency of tags.
Also, I noticed this doesn't happen when I refresh the page.
But after navigating from 1 page to another, the bug appears again.
My code:
let group = $derived(page.params.group!);
let name = $derived(capitalCase(group));
let tags = $derived(new Set(group === 'all-games' ? [] : [group]));
let sort = $derived(page.params.sort as 'new');
$effect(() => {
console.log(group);
});
$effect(() => {
console.log(tags);
});
$effect(() => {
console.log(sort);
});Reproduction
I tried to make a replica of the problem.
But for some reason, I can't get it to trigger.
Maybe the replica will still help
Logs
System Info
System:
OS: macOS 26.3
CPU: (10) arm64 Apple M1 Pro
Memory: 112.14 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - /Users/.../.nvm/versions/node/v22.12.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.9.0 - /Users/.../.nvm/versions/node/v22.12.0/bin/npm
pnpm: 10.5.2 - /opt/homebrew/bin/pnpm
bun: 1.3.9 - /opt/homebrew/bin/bun
Deno: 2.2.4 - /opt/homebrew/bin/deno
Browsers:
Chrome: 145.0.7632.117
Firefox: 147.0.4
Safari: 26.3
npmPackages:
@sveltejs/adapter-auto: ^7.0.1 => 7.0.1
@sveltejs/enhanced-img: 0.10.2 => 0.10.2
@sveltejs/kit: ^2.53.4 => 2.53.4
@sveltejs/vite-plugin-svelte: 6.2.4 => 6.2.4
svelte: 5.53.7 => 5.53.7
vite: ^7.3.1 => 7.3.1Severity
blocking an upgrade
Additional Information
I did enable experimental async Svelte
Reactions are currently unavailable