-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
Describe the bug
In my testing I have found doing changes to be shown to the user on the same page inconsistent particularly when it comes to changing the properties of some object on the screen.
Reproduction
https://github.com/Sendouc/remote-functions-demo/tree/actions-submit
<script>
import { getPost, toggleIsPublished } from '../data.remote.js';
let { params } = $props();
let post = $derived(await getPost(params.slug));
$inspect(post);
</script>
<h1>{post.title}</h1>
<div>{post.isPublished}</div>
<div>{@html post.content}</div>
<button onclick={async () => await toggleIsPublished(params.slug)}>Toggle is published</button>
In this example the inspect
is always consistently showing the updated object but template is not. The first update is not shown (only if you refresh the page). Following command
s (after the first one) in this example are updating the template correctly.
Logs
System Info
System:
OS: macOS 15.6
CPU: (10) arm64 Apple M1 Max
Memory: 3.85 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.17.0 - ~/.nvm/versions/node/v22.17.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn
npm: 10.9.2 - ~/.nvm/versions/node/v22.17.0/bin/npm
pnpm: 10.10.0 - /opt/homebrew/bin/pnpm
bun: 1.0.0 - ~/.nvm/versions/node/v16.16.0/bin/bun
Browsers:
Chrome: 139.0.7258.67
Edge: 138.0.3351.121
Safari: 18.6
npmPackages:
@sveltejs/adapter-vercel: ^5.6.3 => 5.8.0
@sveltejs/kit: 2.27.1 => 2.27.1
@sveltejs/vite-plugin-svelte: ^6.0.0 => 6.1.0
svelte: ^5.38.0 => 5.38.0
vite: ^7.0.4 => 7.0.5
Severity
blocking an upgrade
Additional Information
We have even noticed cases in our application where using an if
block or not can make the update to be lost and in this case repeating the call makes no difference. I couldn't create a reproduction of this though.
Metadata
Metadata
Assignees
Labels
No labels