docs(plan): update Tasks 12/13 to unwrap TanStack Query's Readable store
TanStack Query 5's Svelte adapter returns a Readable<QueryObserverResult> store, not a plain object. Pages need to destructure with $-subscription: const queryStore = $derived(createXQuery(id)); const query = $derived($queryStore); Applied to artist + album detail page templates. Task 11 already landed with this fix (and readable-wrapped mocks in test-utils). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1423,7 +1423,8 @@ Expected: FAIL — component not found.
|
||||
import type { ApiError } from '$lib/api/client';
|
||||
|
||||
const id = $derived(page.params.id);
|
||||
const query = $derived(createArtistQuery(id));
|
||||
const queryStore = $derived(createArtistQuery(id));
|
||||
const query = $derived($queryStore);
|
||||
const showSkeleton = useDelayed(() => query.isPending);
|
||||
|
||||
const notFound = $derived(
|
||||
@@ -1631,7 +1632,8 @@ Expected: FAIL — component not found.
|
||||
import type { ApiError } from '$lib/api/client';
|
||||
|
||||
const id = $derived(page.params.id);
|
||||
const query = $derived(createAlbumQuery(id));
|
||||
const queryStore = $derived(createAlbumQuery(id));
|
||||
const query = $derived($queryStore);
|
||||
const showSkeleton = useDelayed(() => query.isPending);
|
||||
|
||||
const notFound = $derived(
|
||||
|
||||
Reference in New Issue
Block a user