Part of #51. Depends on Effort 1. Behavioral changes, route-by-route.
What
Per feature, on routes that own the data: add a loader using context.queryClient.ensureQueryData(factory(...)), replace non-conditional useQuery reads with useSuspenseQuery(factory(...)) (deleting null-guards), and add an errorComponent. enabled/conditional queries stay useQuery (25 files use the pattern).
Pilot the festival → edition → set slice end-to-end first as the reference implementation reviewers sign off on before rollout.
Per-feature checklist (leaf-first order)
Auth-dependent features are out of scope here — they wait on Effort 3 (#50).
Open questions to resolve here
- Confirm
staleTime: 5_000 or override per-query so loader-prefetched data doesn't instantly refetch.
errorComponent: global default vs per-route.
Part of #51. Depends on Effort 1. Behavioral changes, route-by-route.
What
Per feature, on routes that own the data: add a
loaderusingcontext.queryClient.ensureQueryData(factory(...)), replace non-conditionaluseQueryreads withuseSuspenseQuery(factory(...))(deleting null-guards), and add anerrorComponent.enabled/conditional queries stayuseQuery(25 files use the pattern).Pilot the festival → edition → set slice end-to-end first as the reference implementation reviewers sign off on before rollout.
Per-feature checklist (leaf-first order)
festivals+editions+sets(pilot slice, end-to-end)stagesgenresfestival-infocustom-linksknowledgeartists(+artist-notes)groups(+invites)votingAuth-dependent features are out of scope here — they wait on Effort 3 (#50).
Open questions to resolve here
staleTime: 5_000or override per-query so loader-prefetched data doesn't instantly refetch.errorComponent: global default vs per-route.