From 0242188b1bc2e5ef476748b644490f1c6b5f5455 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 27 Aug 2025 18:54:14 -0400 Subject: [PATCH] Revert "Sync `kit` docs (#1509)" This reverts commit 17212cc464d8a08cd11d9512b8601d7b85ec6a93. --- .../20-core-concepts/60-remote-functions.md | 29 ++----------------- .../docs/kit/98-reference/10-@sveltejs-kit.md | 6 ---- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/apps/svelte.dev/content/docs/kit/20-core-concepts/60-remote-functions.md b/apps/svelte.dev/content/docs/kit/20-core-concepts/60-remote-functions.md index e4d5e12e6e..072e3270db 100644 --- a/apps/svelte.dev/content/docs/kit/20-core-concepts/60-remote-functions.md +++ b/apps/svelte.dev/content/docs/kit/20-core-concepts/60-remote-functions.md @@ -161,9 +161,9 @@ export const getPost = query(v.string(), async (slug) => { Both the argument and the return value are serialized with [devalue](https://github.com/sveltejs/devalue), which handles types like `Date` and `Map` (and custom types defined in your [transport hook](hooks#Universal-hooks-transport)) in addition to JSON. -### Updating queries +### Refreshing queries -Any query can be re-fetched via its `refresh` method, which retrieves the latest value from the server: +Any query can be updated via its `refresh` method: ```svelte ``` -Alternatively, if you need to update its value manually, you can use the `set` method: - -```svelte - -``` - -> [!NOTE] Queries are cached while they're on the page, meaning `getPosts() === getPosts()`. This means you don't need a reference like `const posts = getPosts()` in order to update the query. +> [!NOTE] Queries are cached while they're on the page, meaning `getPosts() === getPosts()`. This means you don't need a reference like `const posts = getPosts()` in order to refresh the query. ## form diff --git a/apps/svelte.dev/content/docs/kit/98-reference/10-@sveltejs-kit.md b/apps/svelte.dev/content/docs/kit/98-reference/10-@sveltejs-kit.md index 59049da645..557e08020f 100644 --- a/apps/svelte.dev/content/docs/kit/98-reference/10-@sveltejs-kit.md +++ b/apps/svelte.dev/content/docs/kit/98-reference/10-@sveltejs-kit.md @@ -2191,12 +2191,6 @@ type RemotePrerenderFunction = ( ```dts type RemoteQuery = RemoteResource & { - /** - * On the client, this function will update the value of the query without re-fetching it. - * - * On the server, this throws an error. - */ - set(value: T): void; /** * On the client, this function will re-fetch the query from the server. *