Skip to main content

Requirements

Before installing the TanStack Router SDK, ensure you have:
  • TanStack Router 1.0+ - The SDK requires TanStack Router 1.0 or later
  • React 18+ - The SDK requires React 18 or later
  • Node.js 18+ - Node.js 18 or later
  • pnpm 8+ (recommended) - Or npm 9+
  • Wacht Deployment - A Wacht deployment with a public key

Installation

Install the TanStack Router SDK and its dependencies:
pnpm add @wacht/tanstack-router @wacht/types
Or with npm:
npm install @wacht/tanstack-router @wacht/types

Environment Variables

Add your Wacht public key to your environment variables:
# .env
VITE_WACHT_PUBLIC_KEY=your_public_key_here
You can find your public key in your Wacht deployment settings.

TypeScript Configuration

The SDK includes TypeScript definitions. No additional configuration is needed.

Peer Dependencies

The SDK has these peer dependencies:
{
  "peerDependencies": {
    "@wacht/types": "*",
    "@tanstack/react-router": "^1.0.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0"
  }
}

Verification

Verify the installation:
import { DeploymentProvider } from '@wacht/tanstack-router'

// This should work without errors
console.log(DeploymentProvider)

Next Steps