Back to Router

TanStack Router - React Query File-Based Example

examples/react/basic-react-query-file-based/README.md

1.166.7839 B
Original Source

TanStack Router - React Query File-Based Example

An example combining file-based routing with TanStack Query integration.

Start a new project based on this example

To start a new project based on this example, run:

sh
npx gitpick TanStack/router/tree/main/examples/react/basic-react-query-file-based basic-react-query-file-based

Getting Started

Install dependencies:

sh
pnpm install

Start the development server:

sh
pnpm dev

Build

Build for production:

sh
pnpm build

About This Example

This example demonstrates:

  • File-based routing with TanStack Router
  • TanStack Query integration
  • Type-safe data fetching
  • Automatic route generation
  • Query-based data loading per route