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. — Confirmed: global 5_000 in src/main.tsx already matches the recommendation, no change needed.
errorComponent: global default vs per-route. — Resolved: added defaultErrorComponent (src/components/layout/RouteErrorFallback.tsx) on the router in src/main.tsx, per-route only where bespoke handling is needed later.
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. — Confirmed: global5_000insrc/main.tsxalready matches the recommendation, no change needed.errorComponent: global default vs per-route. — Resolved: addeddefaultErrorComponent(src/components/layout/RouteErrorFallback.tsx) on the router insrc/main.tsx, per-route only where bespoke handling is needed later.