router-core/data-loading

Official

Data loading with TanStack Router.

AuthorTanStack
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Data-loading patterns in TanStack Router can be verbose and error-prone without a structured guide that explains how to combine loaders, cache keys (loaderDeps), and deferred loading in real-world apps.

Core Features & Use Cases

  • Loader usage with params, deps, and context
  • loaderDeps for cache keys and dependent search params
  • Default SWR-like caching with staleTime, preloadStaleTime, and gcTime
  • Pending states, error handling, and beforeLoad/context
  • Deferred data loading with Await integration
  • createRootRouteWithContext factory pattern for typed context

Quick Start

Create a sample route using createFileRoute with a loader, a loaderDeps, and an optional pendingComponent to observe loading behavior.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: router-core/data-loading
Download link: https://github.com/TanStack/router/archive/main.zip#router-core-data-loading

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.