SuperAPI AI Directory

tanstack-router-best-practices

Frontend & websites

View repository

Updated 10-16 06:14

About this skill

TanStack Router Best Practices

Selected guidelines for implementing TanStack Router patterns in React applications. These rules optimize type safety, data loading, navigation, and code organization.

When to Apply

  • Setting up application routing
  • Creating new routes and layouts
  • Implementing search parameter handling
  • Configuring data loaders
  • Setting up code splitting
  • Integrating with TanStack Query
  • Refactoring navigation patterns

Available local rules

This package contains 15 rule files. Consult the official documentation for topics not covered here, matching the installed package version.

How to Use

Each rule file in the rules/ directory contains:

  1. Explanation — Why this pattern matters
  2. Bad Example — Anti-pattern to avoid
  3. Good Example — Recommended implementation
  4. Context — When to apply or skip this rule

Full Reference

See individual rule files in rules/ directory for detailed guidance and code examples.