Verbesserungen bei Formularen und Remote-Funktionen
Formulare und Remote-Funktionen in SvelteKit wurden verbessert: submit gibt einen Boolean zurück, eine neue .live(...)-Abfragefunktion und unterstützte Felder für Booleans sind hinzugekommen, mit einigen Breaking Changes.
This month we got a bunch of improvements in SvelteKit’s forms and remote functions. Plus, a new query function (.live(...)) that makes accessing real-time data from the server easier.
Keep an eye out for a few breaking changes in remote functions, if you’re using those. Otherwise, enjoy all the new SvelteKit features and bug fixes in the latest versions of Svelte.
Let’s dive in!
What’s new in SvelteKit
- Form
submitnow returns a boolean to indicate submission validity for enhanced remote forms (2.57.0, Docs, #15530) - Breaking:
requested(...)now requireslimitand yields{ arg, query }entries instead of returning the validated argument directly (2.58.0, Docs, #15739) requested(...)now supportsquery.batch(...), which makes batch remote query workflows easier to inspect in request-time logic (2.59.0, Docs, #15751)submitandhiddenremote form fields can now accept booleans and numbers directly (2.60.0, Docs, #15802) …