Getting Started with TanStack Start
reacttanstackweb-dev
Getting Started with TanStack Start
TanStack Start is a modern, full-stack React framework that brings together the best of the TanStack ecosystem. Here's why I love it.
What Makes It Different?
Unlike other frameworks, TanStack Start is built on top of TanStack Router, which means you get:
- Type-safe routing - Your routes are fully typed
- File-based routing - Intuitive organization
- Server functions - Easy server-side logic
- View transitions - Smooth page animations
A Simple Example
Here's how easy it is to create a page:
import { createFileRoute } from '@tanstack/react-router'
export const Route = createFileRoute('/hello')({
component: HelloPage,
})
function HelloPage() {
return <h1>Hello, World!</h1>
}
Server Functions
Need to fetch data? Server functions make it simple:
import { createServerFn } from '@tanstack/react-start'
const fetchData = createServerFn({ method: 'GET' })
.handler(async () => {
// This runs on the server!
return { message: 'Hello from the server' }
})
What's Next?
I'm really excited about this framework. Give it a try and let me know what you think!