Skip to content

Effort 2 — Router adoption (loaders + useSuspenseQuery per feature) #53

Description

@chiptus

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)

  • festivals + editions + sets (pilot slice, end-to-end)
  • stages
  • genres
  • festival-info
  • custom-links
  • knowledge
  • artists (+ artist-notes)
  • groups (+ invites)
  • voting

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions