router-core/not-found-and-errors

Official

Graceful not-found and error handling for routes.

AuthorTanStack
Version1.0.0
Installs0

System Documentation

What problem does it solve?

TanStack Router's not-found and error handling addresses how to render 404-style content, and manage per-route error boundaries, including notFound() and errorComponent configurations, to provide graceful degradation.

Core Features & Use Cases

  • Global 404: configure notFoundComponent on a root or parent route to render a default not found UI.
  • Per-route notFound: throw notFound() inside a loader to render a route-specific not-found boundary.
  • Error boundaries: assign errorComponent per route to display loader errors and allow retry via router.invalidate().
  • notFoundMode: control not-found propagation with fuzzy or root modes.
  • Safe data patterns: avoid rely on useLoaderData in notFoundComponent; use Route.useParams/useSearch or data option.

Quick Start

Implement notFound() in a loader when a resource is missing and configure a notFoundComponent to render a friendly message.

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/not-found-and-errors
Download link: https://github.com/TanStack/router/archive/main.zip#router-core-not-found-and-errors

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.