Loading...
Loading...
SvelteKit remote functions guidance. Use for command(), query(), form() patterns in .remote.ts files.
npx skill4agent add spences10/svelte-skills-kit sveltekit-remote-functions*.remote.tscommand()query()form()// actions.remote.ts
import { command } from "$app/server";
import * as v from "valibot";
export const delete_user = command(
v.object({ id: v.string() }),
async ({ id }) => {
await db.users.delete(id);
return { success: true };
}
);
// Call from client: await delete_user({ id: '123' });getRequestEvent()<svelte:boundary>{@const await}query().refresh()