Let Me Prove I'm Right
I'm making a bet. Your table code has:
- Column definitions (manually written)
- Filter logic
- Sort logic
- Pagination state
- API connection
- Loading states
- URL sync
- Export functionality
That's 200+ lines minimum. I've seen projects with 600+.
Don't believe me? Go count yours right now. I'll wait. ☕️
Why This Happens
TanStack Table is incredible. Headless, flexible, powerful.
But that's the trap. It gives you primitives. You still have to:
- Map your schema to columns
- Build filter/sort/pagination UI
- Connect server-side logic
- Handle URL state
- Add export functionality
That's not TanStack's fault. It's headless by design.
I know because I did this for 3 years.
I Got Tired of Being a Boilerplate Factory
So I built TableCraft — a layer on top of TanStack Table that generates everything from your Drizzle schema.
// Backend: Connect schema, get full API
const users = defineTable(schema.users)
.hide('password')
.search('email', 'name')
.sort('-createdAt')
// Frontend: One component, done
<DataTable adapter={createTableCraftAdapter({ table: 'users' })} />
What you get:
- ✅ Auto-generated columns from schema
- ✅ Server-side filtering, sorting, pagination
- ✅ Search, export, date pickers
- ✅ URL state sync
- ✅ TypeScript types
All powered by TanStack Table under the hood.
Challenge for You 💪
Go check your last project.
Count the lines of table-related code (columns, filters, pagination, API routes).
Highest I've seen: 600+ lines. Beat that. 🏆
Comment below with:
- Lines of code
- Hours spent
- Would you use a tool that auto-generates this?
I'll go first: 340 lines, 4 hours, and yes I built the tool.
Your turn. 👇
Links:
Top comments (0)