You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhanced forms should make one request when submitted, not two #16691
I'm working on an application written with SvelteKit that makes heavy use of Form Actions and use:enhance. Unfortunately, every form submission feels extra sluggish in large part because it triggers two round trips in sequence: the form submission itself followed by a subsequent invalidateAll. This approximately doubles the apparent slowness on high-latency connections.
Instead, the newly updated page data should be included in the response to the initial form submission, so that only a single round trip is required. This is already what happens when the form is submitted with javascript disabled, so it's unfortunate that trying to enhance the form submission UX in fact significantly degrades it in this way.
I don't know whether the svelte team classifies performance issues like this as bugs, so apologies if I've chosen an inappropriate label.
Oh, that is unfortunate. Am I understanding correctly that I will need to wait until remote functions are stabilized and then re-write all of my forms/actions to use them?
Activity
teemingc commentedon Aug 8, 2026
I don't know if we'll work on this as this is superseded by the
formremote function that does this https://svelte.dev/docs/kit/remote-functions#Single-flight-mutationsldhenk commentedon Aug 8, 2026
Oh, that is unfortunate. Am I understanding correctly that I will need to wait until remote functions are stabilized and then re-write all of my forms/actions to use them?
Nic-Polumeyv commentedon Aug 8, 2026
although remote functions are experimental, they are almost certainly something you should consider slowly transitioning to at this point.
docs: add remote functions note to form actions page (#16746)