JavaScript в TypeScript Converter
import React from "react";
import { useTable } from "react-table";
export default function BasicTable({ columns, data }) {
// Use the useTable Hook to send the columns and data to build the table
const {
getTableProps, // Sends the needed props to your table.
getTableBodyProps, // Sends needed props to your table body
headerGroups, // Returns normalized header groups
rows, // rows for the table based on the data passed
prepareRow // Prepare the row in order to be displayed.
} = useTable({
columns,
data
});
}
Manu Srinivasa