Build headless data tables with TanStack Table v8. Provides server-side pagination, filtering, sorting, and virtualization patterns for Cloudflare Workers + D1 databases. Use when building tables with large datasets, coordinating with TanStack Query, or troubleshooting state management issues, pagination coordination errors, or performance bottlenecks.
Build production-ready, headless data tables with TanStack Table v8, optimized for server-side patterns and Cloudflare Workers integration.
This skill automatically activates when you mention:
import { useReactTable, getCoreRowModel } from '@tanstack/react-table'
import { useQuery } from '@tanstack/react-query'
import { useState } from 'react'
function UsersTable() {
const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: 20 })
// TanStack Query fetches data
const { data } = useQuery({
queryKey: ['users', pagination.pageIndex, pagination.pageSize],
queryFn: () => fetch(`/api/users?page=${pagination.pageIndex}&pageSize=${pagination.pageSize}`)
.then(r => r.json())
})
// TanStack Table manages display
const table = useReactTable({
data: data?.data ?? [],
columns,
getCoreRowModel: getCoreRowModel(),
manualPagination: true, // Server handles pagination
pageCount: data?.pagination.pageCount ?? 0,
state: { pagination },
onPaginationChange: setPagination,
})
return <div>{/* render table */}</div>
}
// Cloudflare Workers API
export async function onRequestGet({ request, env }) {
const url = new URL(request.url)
const page = Number(url.searchParams.get('page')) || 0
const pageSize = 20
const offset = page * pageSize
const { results } = await env.DB.prepare(`
SELECT * FROM users
ORDER BY created_at DESC
LIMIT ? OFFSET ?
`).bind(pageSize, offset).all()
const { total } = await env.DB.prepare(`
SELECT COUNT(*) as total FROM users
`).first()
return Response.json({
data: results,
pagination: {
page,
pageSize,
total,
pageCount: Math.ceil(total / pageSize),
},
})
}
manual* flagsReact 19.2 + Vite 6.0
↓
TanStack Query (data fetching) ← tanstack-query skill
↓
TanStack Table (display) ← THIS SKILL
↓
Cloudflare Workers API ← cloudflare-worker-base skill
↓
Cloudflare D1 Database ← cloudflare-d1 skill
map()| Metric | Without Skill | With Skill | Savings | |--------|--------------|------------|---------| | Tokens | ~8,000 | ~3,500 | 55% | | Time | 30-45 min | 10-15 min | 67% | | Errors | 3-4 | 0 | 100% |
npm install @tanstack/react-table@latest
# For virtualization (optional):
npm install @tanstack/react-virtual@latest
Latest Versions:
@tanstack/react-table: v8.21.3@tanstack/react-virtual: v3.13.12~/.claude/skills/tanstack-table/
├── SKILL.md # Complete documentation
├── README.md # This file
├── templates/
│ ├── package.json # Dependencies
│ ├── basic-client-table.tsx # Simple example
│ ├── server-paginated-table.tsx # Server-side pagination
│ ├── d1-database-example.tsx # Cloudflare D1 integration
│ ├── column-configuration.tsx # Type-safe columns
│ ├── virtualized-large-dataset.tsx # Performance optimization
│ └── shadcn-styled-table.tsx # Tailwind + shadcn
└── references/
├── server-side-patterns.md # API-driven tables guide
├── query-integration.md # TanStack Query patterns
├── cloudflare-d1-examples.md # Workers + D1 examples
├── performance-virtualization.md # TanStack Virtual guide
└── common-errors.md # 6+ issues + solutions
Tested with:
Cloudflare Integration:
~/.claude/skills/tanstack-table/SKILL.mdVersion: 1.0.0 Last Updated: 2025-11-07 Author: Jeremy Dawes | Jezweb License: MIT
npx skills add ovachiever/TanStack 表格下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer