-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs(Start): Revise migration guide for TanStack Start #5211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Update installation instructions and routing configurations for TanStack Start.
WalkthroughDocumentation for migrating from Next.js to React with TanStack Start was updated: install lines and tooling moved Vite-related packages into Tailwind/JS tooling, added tanstackStart Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant Router as Router (createFileRoute / Route)
participant Server as Server (createServerFn)
Client->>Router: navigate (Link to="/posts/1")
Router->>Router: Route.useParams() -> { id: "1" }
Router->>Router: Route.loader() / useLoaderData()
Router->>Server: call server function (createServerFn.handler)
Server-->>Router: response (data/json)
Router-->>Client: render component with data
Note right of Router #D6EAF8: New/public APIs used:\ncreateFileRoute, Route.useParams,\nuseLoaderData, createServerFn
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)docs/**/*.{md,mdx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
docs/{router,start}/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
🔇 Additional comments (14)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/start/framework/react/migrate-from-next-js.md (2)
118-118: Use internal relative docs links per repo guidelines.Replace absolute site links with paths relative to docs/.
-... [Routing Concepts](/router/latest/docs/framework/react/routing/routing-concepts) ... +... [Routing Concepts](../../../router/framework/react/routing/routing-concepts) ...-... [preloading functionality](/router/latest/docs/framework/react/guide/preloading) ... -... [caching staleness](/router/latest/docs/framework/react/guide/data-loading) ... +... [preloading functionality](../../../router/framework/react/guide/preloading) ... +... [caching staleness](../../../router/framework/react/guide/data-loading) ...-Learn more about the [Routing Concepts](/router/latest/docs/framework/react/routing/routing-concepts). +Learn more about the [Routing Concepts](../../../router/framework/react/routing/routing-concepts).-... [Dynamic and Catch-All Routes](/router/latest/docs/framework/react/routing/routing-concepts#dynamic-route-segments). +... [Dynamic and Catch-All Routes](../../../router/framework/react/routing/routing-concepts#dynamic-route-segments).-Learn more about the [Links](/router/latest/docs/framework/react/guide/navigation#link-component). +Learn more about the [Links](../../../router/framework/react/guide/navigation#link-component).Also applies to: 233-234, 264-264, 291-291, 305-305
270-285: Fix incorrect route path in dynamic route example.The path passed to createFileRoute should not include the
appfolder prefix. It should be the actual URL path.-export const Route = createFileRoute('/app/posts/$slug')({ +export const Route = createFileRoute('/posts/$slug')({ component: Page, })
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/start/framework/react/migrate-from-next-js.md(3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
docs/**/*.{md,mdx}
📄 CodeRabbit inference engine (AGENTS.md)
Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)
Files:
docs/start/framework/react/migrate-from-next-js.md
docs/{router,start}/**
📄 CodeRabbit inference engine (AGENTS.md)
Place router docs under docs/router/ and start framework docs under docs/start/
Files:
docs/start/framework/react/migrate-from-next-js.md
🔇 Additional comments (3)
docs/start/framework/react/migrate-from-next-js.md (3)
114-114: LGTM: Clear note on routesDirectory default.Good clarification about the default and opting into
appfor Next.js parity.
217-231: LGTM: Introducing src/router.tsx is consistent with Start’s router setup.
103-111: Plugin order is correct — tanstackStart before @vitejs/plugin-reactTanStack docs recommend placing tanstackStart(...) before viteReact(); the snippet already follows that. Optionally set tanstackStart({ customViteReactPlugin: true }) to let it manage the React plugin integration.
Update installation instructions and routing configurations for TanStack Start.
Summary by CodeRabbit