secondsky/claude-skills / plugins/tanstack-table/skills/tanstack-table
tanstack-table
VerifiedTanStack Table v8 headless data tables with server-side features for Cloudflare Workers + D1. Use for pagination, filtering, sorting, virtualization, or encountering state management, TanStack Query coordination, URL sync errors.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 22.1 KB |
| references/cloudflare-d1-examples.md | markdown | 3.4 KB |
| references/common-errors.md | markdown | 4.5 KB |
| references/feature-controls.md | markdown | 4.3 KB |
| references/performance-virtualization.md | markdown | 2.4 KB |
| references/query-integration.md | markdown | 5.1 KB |
| references/server-side-patterns.md | markdown | 8.9 KB |
| templates/basic-client-table.tsx | other | 2.7 KB |
| templates/column-configuration.tsx | other | 4.1 KB |
| templates/controlled-table-state.tsx | other | 9.0 KB |
| templates/d1-database-example.tsx | other | 9.2 KB |
| templates/package.json | manifest | 631 B |
| templates/server-paginated-table.tsx | other | 6.2 KB |
| templates/shadcn-styled-table.tsx | other | 3.2 KB |
| templates/virtualized-large-dataset.tsx | other | 4.7 KB |
templates/basic-client-table.tsx
View on GitHub/**
* Basic Client-Side Table
*
* Simple TanStack Table example with local data.
* Use for: Small datasets (<1000 rows), all data available client-side
*/
import { useReactTable, getCoreRowModel, ColumnDef, flexRender } from '@tanstack/react-table'
import { useMemo } from 'react'
interface User {
id: string
name: string
email: string
role: string
}
// Define columns outside component OR use useMemo to prevent infinite re-renders
const columns: ColumnDef<User>[] = [
{
accessorKey: 'id',
header: 'ID',
},
{
accessorKey: 'name',
header: 'Name',
},
{
accessorKey: 'email',
header: 'Email',
},
{
accessorKey: 'role',
header: 'Role',
},
]
export function BasicClientTable() {
// CRITICAL: Memoize data to prevent infinite re-renders
const data = useMemo<User[]>(
() => [
{ id: '1', name: 'Alice Smith', email: 'alice@example.com', role: 'Admin' },
{ id: '2', name: 'Bob Johnson', email: 'bob@example.com', role: 'User' },
{ id: '3', name: 'Charlie Brown', email: 'charlie@example.com', role: 'User' },
{ id: '4', name: 'Diana Prince', email: 'diana@example.com', role: 'Editor' },
],
[]
)
const table = useReactTable({
data,
columns,
getCoreRowModel: getCoreRowModel(), // Required: Core functionality
})
return (
<div className="p-4">
<h2 className="text-2xl font-bold mb-4">Users</h2>
<table className="w-full border-collapse border border-gray-300">
<thead>
{table.getHeaderGroups().map(headerGroup => (
<tr key={headerGroup.id} className="bg-gray-100">
{headerGroup.headers.map(header => (
<th
key={header.id}
className="border border-gray-300 px-4 py-2 text-left"
>
{header.isPlaceholder
? null
: flexRender(
header.column.columnDef.header,
header.getContext()
)}
</th>
))}
</tr>
))}
</thead>
<tbody>
{table.getRowModel().rows.map(row => (
<tr key={row.id} className="hover:bg-gray-50">
{row.getVisibleCells().map(cell => (
<td
key={cell.id}
className="border border-gray-300 px-4 py-2"
>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</td>
))}
</tr>
))}
</tbody>
</table>
<div className="mt-4 text-sm text-gray-600">
Showing {table.getRowModel().rows.length} rows
</div>
</div>
)
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |