Part of epic #491. Owner direction repeated on 8 route files:
use route loader for the content of the page.
use tanstack router convention for error boundary.
Routes (8)
apps/client/src/routes/_authenticated/_app/watchlist.tsx
apps/client/src/routes/_authenticated/_app/watchlist.index.tsx
apps/client/src/routes/_authenticated/_app/watchlist.ready.tsx
apps/client/src/routes/_authenticated/_app/watchlist.in-progress.tsx
apps/client/src/routes/_authenticated/_app/watchlist.awaiting.tsx
apps/client/src/routes/_authenticated/_app/watchlist.upcoming.tsx
apps/client/src/routes/_authenticated/_app/watchlist.unavailable.tsx
apps/client/src/routes/_authenticated/_app/watchlist.moods.$moodId.tsx
Goal
- Move data fetching out of component into route
loader (or loaderDeps + loader).
- Use TanStack
errorComponent route option instead of in-component <ErrorBoundary> wrapper.
- Page components consume loader data via
Route.useLoaderData() / suspense queries.
Bonus item
watchlist.moods.$moodId.tsx:16 — review comment "is this needed?". Verify the line in question and remove if dead.
Acceptance criteria
Part of epic #491. Owner direction repeated on 8 route files:
Routes (8)
apps/client/src/routes/_authenticated/_app/watchlist.tsxapps/client/src/routes/_authenticated/_app/watchlist.index.tsxapps/client/src/routes/_authenticated/_app/watchlist.ready.tsxapps/client/src/routes/_authenticated/_app/watchlist.in-progress.tsxapps/client/src/routes/_authenticated/_app/watchlist.awaiting.tsxapps/client/src/routes/_authenticated/_app/watchlist.upcoming.tsxapps/client/src/routes/_authenticated/_app/watchlist.unavailable.tsxapps/client/src/routes/_authenticated/_app/watchlist.moods.$moodId.tsxGoal
loader(orloaderDeps+loader).errorComponentroute option instead of in-component<ErrorBoundary>wrapper.Route.useLoaderData()/ suspense queries.Bonus item
watchlist.moods.$moodId.tsx:16— review comment "is this needed?". Verify the line in question and remove if dead.Acceptance criteria
errorComponentroute option (no<ErrorBoundary>wrappers in components).errorComponent.