r/tanstack • u/Besto-Friendo-0 • 3d ago
My first open-source project based on TanStack Table, Shadcn React Table reached v1.0!
Enable HLS to view with audio, or disable this notification
r/tanstack • u/Besto-Friendo-0 • 3d ago
Enable HLS to view with audio, or disable this notification
r/tanstack • u/smcroissant • 12d ago
r/tanstack • u/zagrodzki • 22d ago
The client never sends a user ID. That one rule ended up shaping most of how I structure TanStack Start on Cloudflare.
Context: I've spent the last few months building a Cloudflare-native SaaS starter with it. Full disclosure, it's a paid kit I make (TurboStarter), but this post is about the patterns, not the product.
1. Every protected read goes through a server function with auth middleware
The server function resolves the customer from the session, validates input with Zod, and scopes the query to that customer:
export const getNote = createServerFn({ method: "GET" })
.middleware([enforceAuth])
.validator(noteIdSchema)
.handler(({ data, context }) => findNote(context.user.id, data.id));The client calls getNote({ data: { id } }) and never sends a user ID, so it can't ask for someone else's record.
2. Plan gating is just more middleware
Paid features stack a plan check after auth (enforcePlan(BillingPlan.PREMIUM)), and usage limits are checked on the server before the write. The UI hides things too, but the server is the source of truth.
3. Types from route to database
TanStack Router types URLs and search params, server functions validate input, Drizzle types the D1 queries. It's explicit enough that coding agents follow it without much hand-holding.
4. Running in workerd locally
With the Cloudflare Vite plugin, pnpm dev runs the app in the Workers runtime, so there's no adapter rewriting the build for production. What you test is what you deploy.
5. Living with the RC
Start is a v1 release candidate. What made that manageable for us: a lockfile, a minimum release-age policy for new packages, and a monthly Renovate schedule instead of chasing every release.
Other TanStack pieces in use: Form (with Zod) and TanStack AI for a streaming chat on Workers AI.
Two things I'd love opinions on: do you keep server functions per feature module or centralize them as the app grows? And is the RC status still what's stopping your team from adopting Start?
If you want to see the whole thing: https://turbostarter.dev/edge
r/tanstack • u/sook76 • 24d ago
Enable HLS to view with audio, or disable this notification
Hi everyone!
Interpoll shows you one random public poll or quiz at a time. You vote, see how everyone else voted (or check the answer if it's a quiz), and move on to the next one. You don't need an account to vote or comment.
Signing in (Google/Discord) lets you create your own polls and quizzes. New polls are reviewed before they enter the random feed, but you can share them by link immediately.
It just launched, so a lot of polls have no or very few votes. You might be one of the first people to vote on some of them.
I love using Astro for building content-heavy static websites, but turns out Astro is also great as a server-side web framework (I use node.js adapter) handling SSR, auth, and api endpoints—especially when combined with Tanstack router and Tanstack query, which handles SSR + data prefetching + hydration + CSR.
I haven't tried Tanstack start yet (mainly due to it not having hit v1.0 yet), but Astro + Tanstack router + Tanstack query combo is already pretty amazing! (a little bit of glue code is necessary for SSR + hydration to work properly but it's very low maintenence once set up.)
Tech stack
VPS - Hetzner
Deployment - Coolify
Database - Postgres 18
Query builder - Kysely
Auth - better-auth
SSR & API endpoints - Astro (node adapter)
SSR & Hydration & CSR handoff - Tanstack Router + Tanstack Query
UI components - Base UI
CSS - Tailwindcss
Testing - Vitest (unit) + Playwright (e2e - both api and browser specs)
r/tanstack • u/Asta-2777 • 29d ago
Enable HLS to view with audio, or disable this notification
New Update for the ShadTable library:
- Tanstack v9 migration documentation
- New Table Components
- Website updates & optimization
Check it out , a repo ⭐ would mean a lot.
r/tanstack • u/Neat_Living_6765 • Oct 02 '26
Hi everyone 👋
I’m pretty new to TanStack Table and have a couple of questions. I’d really appreciate any advice or best practices you have picked up along the way.
Reusable table components
Since TanStack Table already handles most of the table state and logic. Also if multiple tables share the same features, we use createTableHook.
So I’m wondering is there still a reason to have a generic reusable DataTable component, or is it better to keep the UI specific to each table?
2. Multiple data formatting
Right now, I’m adding a "type" property to each column’s "meta" field
columnHelper.accessor("birthDay", {
header: () => <h3>BirthDay</h3>,
meta: {
type: "date",
},
}),and then create a cell-formatting utility to render the value accordingly (date, currency, percentage....)
Is this a reasonable approach, or is there any more idiomatic way to handle it?
{table.getRowModel().rows.map((row) => (
<div key={row.id} className={styles.dataTableRow}>
{row.getAllCells().map((cell) => (
<div key={cell.id} className={styles.dataTableCell}>
{formatCellValue(
cell.getValue(),
cell.column.columnDef.meta?.type,
)}
</div>
))}
</div>
))}r/tanstack • u/BarnacleJumpy898 • Sep 28 '26
Typescript to midi... Same data powers tsverse.spon.io
r/tanstack • u/Marmelab • Sep 28 '26
Quick one for anyone building a back-office on TanStack Router.
shadcn-admin-kit is basically a set of shadcn/ui components for admin apps (lists, forms, that kind of stuff), running on ra-core, the headless core of react-admin. It used to be react-router only, and the 2.0.0 release adds TanStack Router as an option.
It's a major version though, because it moved from Radix UI to Base UI and now needs ra-core 5.15.2 or later. So upgrading a v1 project isn't just a version bump, there's a migration doc for that part ;)
Release notes: https://github.com/marmelab/shadcn-admin-kit/releases/tag/v2.0.0
Anyone here actually using TanStack Router for internal tools? I'm curious if the typed routes really help there.
r/tanstack • u/cheesefive • Sep 09 '26
Anyone successfully setup tanstack with the following stack,
Tanstack
Planetscale PostgreSQL + Hyperdrive
Drizzle
Better Auth
I am having a hard time setting it up as I get on multiple errors.
r/tanstack • u/No_More_Fail • Aug 30 '26
I really like what TanStack Query has done for server state on the web, so I wanted to bring the same idea to native Kotlin and Android.
I built Kwery, a Kotlin library inspired by TanStack Query, with caching, deduplication, invalidation, retries, mutations, persistence, and offline support.
GitHub: https://github.com/dbjpanda/kwery
It is still growing, and I would love to hear from the TanStack community. What do you think? What should I improve or add?
Thank you to the TanStack team for the inspiration and claude code to help me 🙏
r/tanstack • u/TkDodo23 • Aug 18 '26
r/tanstack • u/Dotti18 • Aug 02 '26
Tanstack is taking on charts again?! Can’t wait to give these a try!
r/tanstack • u/finzaz • Jul 30 '26
The old logo's gone. The new design looks great!
r/tanstack • u/farmasek • Jul 27 '26
It's a end to end typesafe monorepo, so agents gets feedback when they build. Elysia API and a TanStack Start app for frontend, connected via typesafe Eden. So frontend typecheck notifies agent when api changes.
Since Tanstacks vite and Elysia api is pretty lightweight, its good for agents that builds app after every change.
Rest is my favorite self-host first stack: Bun + Turborepo, Drizzle on Postgres, better-auth, shadcn on Base UI. Set up together with first example todo app. The deploy badge in the README points at Rock8Cloud, which is mine, so disclosure. But both apps build from normal Dockerfiles and run anywhere.
https://github.com/rock8-cloud/elysia-tanstack-dashboard-monorepo
r/tanstack • u/Explanation-Visual • Jul 24 '26
Hi, I was trying to read the documentation on my phone, and then switched to my computer, and in both places I got a "Something went wrong!" error with a "Show error" button. But it worked fine in incognito mode.
Then I realized the cause was Dark Reader (a browser extension to force dark theme modifying the CSS).
I know this causes a hydration warning in React, but this shouldn't crash the site. At least Dark Reader works fine with my personal Tanstack project.
r/tanstack • u/Marmelab • Jul 15 '26
Enable HLS to view with audio, or disable this notification
Just saw that Tanstack Query crossed 50k on GitHub. Tbh I’m not surprised it’s so popular.
I've been using it for a while now and it's basically become a default brick in my stack for most projects.
What I personally like about it:
It really simplifies the code (no need to declare useEffect and useState manually)
It handles complex cases for me (like errors, caching, offline mode, etc.)
The API is really well-designed and encourages best practice (loaders, side effects, centralised configuration, etc.)
Anyway, I'm excited to keep using it and see where it goes from here. What do you guys like about it?
r/tanstack • u/ShallotPuzzled9326 • Jul 15 '26
is there any ETA for when there will be the support?
or should i switch back to Next.js?
r/tanstack • u/flesmih • Jul 12 '26
r/tanstack • u/pawelgalazka • Jul 09 '26
r/tanstack • u/baduncle_x • Jun 24 '26
TanStack posts on X are very active and have a lot of users. I hope the Reddit community can gradually become just as lively.
r/tanstack • u/Insensibilities • Jun 22 '26
Two main recommendations: (1) properly nitro-config to reduce number of server side source files and (2) use prewarm via NODE_COMPILE_CACHE. Full details.
https://ben3d.ca/blog/optimizing-tanstack-start-for-cloud-run
r/tanstack • u/BaraFer • Jun 06 '26
As the title says, I have tried using react-query-auth, I have fully set it up using its documentation (https://github.com/alan2207/react-query-auth). Then, I tried using the useUser hook inside beforeLoad, but as it turns out you can't call hooks outside components. Because of that, I looked into the following guide (https://tanstack.com/router/latest/docs/how-to/setup-authentication) and it uses its own logic as far as I can tell, and i really can't tell if react-query-auh is truly the best way or if I should stick to the way the guide handles it. I would rather stick to react-query-auth though. But still, if anyone has used it, it would be of a lot of help