AcademyRulesDevelopment

TanStack Router for React

Front-end teams building React apps with type-safe routing who want Cursor to follow the same route conventions.

  • Recommendedour rating
  • 40,892repository stars
  • CC0-1.0licence
  • 4 months agolast update
mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/tanstack-router-react-cursorrules-prompt-file.mdc -o .cursor/rules/tanstack-router-react.mdc
tanstack-router-react.mdc

Loading the file...

What it does

A rules file for Cursor on type-safe routing with TanStack Router, React and TypeScript. It recommends file-based routes, data loading in route loaders instead of effects, validated search params with Zod or Valibot, and a clear route folder layout.

Use cases

  1. 01Create a file-based route with a loader
  2. 02Validate search params with a Zod schema
  3. 03Set up a root layout and index route

Questions about
TanStack Router for React.

What is TanStack Router for React used for?

Front-end teams building React apps with type-safe routing who want Cursor to follow the same route conventions. A rules file for Cursor on type-safe routing with TanStack Router, React and TypeScript. It recommends file-based routes, data loading in route loaders instead of effects, validated search params with Zod or Valibot, and a clear route folder layout.

How do I install TanStack Router for React?

Run this in your terminal: mkdir -p .cursor/rules && curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/tanstack-router-react-cursorrules-prompt-file.mdc -o .cursor/rules/tanstack-router-react.mdc

Is TanStack Router for React open source?

Yes. The code is on GitHub (PatrickJS/awesome-cursorrules) under the CC0-1.0 licence.

Is TanStack Router for React safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.