Closed
Description
Describe the bug
Hello,
Since release 2.12.0, the following code is not reactive anymore with Svelte 4.2, when pressing the button.
Before this release, the number was increasing each time the button is pressed.
After this release, the number increases once to 1, and then is not changing.
In my apps, I have many conditions that are based on the reactiveness of the $page.state (like displaying modals, or panels), and these are not working anymore, and apps can't be used anymore.
Reproduction
<script lang="ts">
import { pushState } from '$app/navigation';
import { page } from '$app/stores';
$: number = $page.state.number ?? 0;
</script>
<div>{number}</div>
<div>{$page.state.number}</div>
<button on:click={() => pushState('', { number: number + 1 })}> Increment </button>
Logs
No response
System Info
System:
OS: Linux 6.10 Alpine Linux
CPU: (12) arm64 unknown
Memory: 5.32 GB / 7.65 GB
Container: Yes
Shell: Unknown - /bin/sh
Binaries:
Node: 22.12.0 - /usr/local/bin/node
Yarn: 1.22.22 - /usr/local/bin/yarn
npm: 10.9.0 - /usr/local/bin/npm
npmPackages:
@sveltejs/adapter-vercel: 5.5.2 => 5.5.2
@sveltejs/kit: ^2.12.0 => 2.12.0
@sveltejs/vite-plugin-svelte: ^3.1.2 => 3.1.2
svelte: ^4.2.19 => 4.2.19
vite: ^5.4.11 => 5.4.11
Severity
blocking all usage of SvelteKit
Additional Information
No response
Metadata
Metadata
Assignees
Labels
No labels