Skip to content

Instantly share code, notes, and snippets.

@Manntrix
Created June 19, 2022 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Manntrix/73082571b34e9391a4af930084670c71 to your computer and use it in GitHub Desktop.
Save Manntrix/73082571b34e9391a4af930084670c71 to your computer and use it in GitHub Desktop.
import "./styles.css";
import Table from "./components/Table";
import { useMemo } from "react";
import data from "./users.json";
export default function App() {
const columns = useMemo(
() => [
{
Header: "ID",
accessor: "id",
},
{
Header: "Name",
accessor: "name",
},
{
Header: "Username",
accessor: "username",
},
{
Header: "Email",
accessor: "email",
},
{
Header: "Phone",
accessor: "phone",
},
],
[]
);
return (
<div className="App">
<Table columns={columns} data={data} />
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment