Storybook has released @storybook/tanstack-react, a dedicated framework for TanStack-powered React apps. It provides automatic RouterProvider wrapping with in-memory history, type-safe route/params/query configuration, auto-mocked TanStack Start server functions, and TanStack Query integration via QueryClient seeding. Server-only dependencies are handled through Vite plugins and automatic stubbing so components render in the browser preview without rewriting imports. Setup works via the Storybook CLI for new projects or automigrate for existing ones. Requires React 18+, Vite 7+, and @tanstack/react-router.
Table of contents
Router-aware rendering for file-based routes and nested layoutsMocked TanStack Start server functionsTanStack Query integrationServer-only dependencies, handledGetting startedThanks314.3K Impressions9 Comments