Framework
Version

How to Install TanStack Router

How to Install TanStack Router

Prerequisites

  • React 18.x.x or 19.x.x
  • ReactDOM 18.x.x or 19.x.x with createRoot support
  • TypeScript 5.3.x or higher (recommended)

Installation Steps

  1. Install the package

    Choose your package manager:

    sh
    npm install @tanstack/react-router
    
    npm install @tanstack/react-router
    
    sh
    pnpm add @tanstack/react-router
    
    pnpm add @tanstack/react-router
    
    sh
    yarn add @tanstack/react-router
    
    yarn add @tanstack/react-router
    
    sh
    bun add @tanstack/react-router
    
    bun add @tanstack/react-router
    
    sh
    deno add npm:@tanstack/react-router
    
    deno add npm:@tanstack/react-router
    
  2. Verify installation

    Check that the package appears in your package.json:

    json
    {
      "dependencies": {
        "@tanstack/react-router": "^x.x.x"
      }
    }
    
    {
      "dependencies": {
        "@tanstack/react-router": "^x.x.x"
      }
    }
    
Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.