Step 5: Create the Table with useTable

The useTable hook creates a table instance and manages React state internally.

// EmployeeTable.tsx
import { useTable, Table } from '@zvndev/yable-react'
import '@zvndev/yable-themes'
import { employees } from './data'
import { columns } from './columns'

export function EmployeeTable() {
  const table = useTable({
    data: employees,
    columns,
  })

  return <Table table={table} />
}

That's it -- you have a rendered table. But it doesn't do anything interactive yet. Let's add features.