-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SvelteKit v2: $page not reevaluated after invalidateAll #11417
Comments
I've faced something similar, not sure if it is related: #11415 |
You can use |
@PatrickG I use
But again, works fine in v1, so maybe it's a breaking change of v2? |
@peterpeterparker, a bit out of subject, but concerning your point of losing the scroll position: have you tried goto(..., {
replaceState: true,
noScroll: true
}) |
@iolyd yeah I did but it did not work as excepted, I might have screw something. Let me try again... |
Glad you could solve your issue. |
Describe the bug
In SvelteKit v2, the
$page
derived store is not reevaluated after triggeringinvalidateAll
. For example, modifying the URL usingreplaceState
and then callinginvalidateAll
to propagate the new URL parameters does not work as expected.This behavior is different from SvelteKit v1, and I assume it's not an intentional breaking change.
Snippet:
+page.svelte
+page.ts
Reproduction
git clone https://github.com/peterpeterparker/invalidate
cd invalidate
npm ci
npm run dev
Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: