router-core/not-found-and-errors

Configure not-found and error boundaries for TanStack Router route trees.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/abereghici/skills --skill router-core-not-found-and-errors-abereghici
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: router-core/not-found-and-errors
Source: https://github.com/abereghici/skills/tree/main/skills/tanstack-router/not-found-and-errors
Command: npx skills add https://github.com/abereghici/skills --skill router-core-not-found-and-errors-abereghici

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TanStack Router handles not-found and loader errors by providing guidance to configure notFound, notFoundComponent, defaultNotFoundComponent, and error boundaries to preserve UX.

Core Features & Use Cases

  • Not Found Handling via notFound() in loaders
  • notFoundComponent, defaultNotFoundComponent, and notFoundMode (fuzzy/root)
  • Per-route errorComponent to render custom error UI and retry with router.invalidate()
  • Safe data handling in notFoundComponent and using Route.useParams/useRouteContext

Quick Start

Use this skill to configure root notFoundComponent and per-route error boundaries for a TanStack Router-based app.

Frequently Asked Questions about router-core/not-found-and-errors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure not-found boundaries in TanStack Router?

To configure not-found boundaries in TanStack Router, use notFound() within loaders and define notFoundComponent or defaultNotFoundComponent to render custom UI for unmatched routes across global, per-route, and nested scenarios.

What is the difference between fuzzy and root notFoundMode in TanStack Router?

The notFoundMode setting in TanStack Router determines boundary matching behavior, allowing you to toggle between fuzzy and root modes to control whether nested or top-level not-found components render for unmatched paths.

How do I handle loader errors with a custom error component in TanStack Router?

Handle loader errors by configuring a per-route errorComponent that renders custom error UI, and enable recovery by calling router.invalidate() to retry the failed data fetching process.

Can I safely access route params inside a notFoundComponent in TanStack Router?

Yes, you can safely access route parameters inside a notFoundComponent by using Route.useParams and Route.useRouteContext, ensuring proper data handling when rendering custom not-found UI for specific paths.

Does TanStack Router support nested not-found components for specific route segments?

Yes, TanStack Router supports nested not-found components, allowing you to configure per-route boundaries that render specialized UI for unmatched paths within specific route tree segments.