A little SvelteKit demo app to demonstrate that form enhancement does not work as expected/documented.
The structure is a bit unusual in that +page.server.ts
is not used at all.
It’s basically an SPA with an API which is simply the context in which I’m
running into this issue.
According to [https://kit.svelte.dev/docs/form-actions#progressive-enhancement)(Form actions docs), the SubmitFunction
can “return a callback that runs with the ActionResult”. However, in practice the result
is the JSON data returned by server instead of an object with a type
property and a combination of status
, data
and/or location
based on its type
.