TanStack Table은 React에서 유연한 테이블을 만들기 위한 라이브러리이다.
데이터 정렬, 필터링, 그룹화, 페이지네이션 등 복잡한 테이블 기능을 쉽게 구현할 수 있게 해준다.
npm install @tanstack/react-table
"use client";
import { ColumnDef } from "@tanstack/react-table";
export type BillboardColumn = {
id: string;
label: string;
createdAt: string;
};
export const columns: ColumnDef<BillboardColumn>[] = [
{
accessorKey: "label",
header: "Label",
},
{
accessorKey: "createdAt",
header: "Date",
},
];