Advanced Usage

TanStack

Advanced guidance for TanStack Start teams shaping prerendering, loader boundaries, preview isolation, and publish-time cache refresh.

With TanStack, the advanced work is mostly about deciding which CMS-backed routes should be prerendered, which stay request-driven, and how shared route data is reused across the route tree.

Rendering strategy

  • prerender stable CMS-backed routes whose path lists can be derived ahead of time;
  • keep route-level content loaders reusable between prerendered and runtime paths;
  • separate long-lived published caches from draft preview responses; and
  • make not-found and redirect behavior consistent for generated and runtime routes.

Preview and editorial flow

  • keep preview reads on the server and gate them behind explicit draft access;
  • resolve locales, slugs, and parent route context before page rendering starts;
  • surface unpublished dependencies clearly so editors can diagnose broken previews; and
  • rebuild or refresh generated output after publish events.

Operational guardrails

  • generate route manifests from CMS data instead of hard-coding large path lists;
  • chunk large prerender work so one broken entry does not fail the entire rollout;
  • record publish-triggered rebuilds and invalidations for debugging; and
  • document which routes are static, hybrid, or always runtime.