How to make a table in React with React Table Library

Getting Started

Creating our React App

Installing React Table Library and Importing it

//For npmnpm install react-table//For yarnyarn add react-table
import React from "react";import { dummy } from "./Data";import { useTable } from "react-table";

Creating and Displaying the Columns

const { instance } = useTable({column,data,});

Table Options

export const tableColumn = [{Header: "Id",accessor: "id",},{Header: "User Name",accessor: "name",},{Header: "Email",accessor: "email",},{Header: "Comments",accessor: "body",},];

--

--

--

I am a front-end developer from India with over one year of experience in freelancing with skills like Git, HTML5, CSS3, Bootstrap 4&5, and React.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

LeetCode 13. Roman to Integer [JavaScript]

React Custom Hooks: Creating A Reusable Meme Generator

TDD in angular

Angular Ecommerce template — Hands-on

Explaining Some JS

C# for JavaScript Developers: Object Oriented Refactoring 01

Vue-core-video-player support HLS format now

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ateev Duggal

Ateev Duggal

I am a front-end developer from India with over one year of experience in freelancing with skills like Git, HTML5, CSS3, Bootstrap 4&5, and React.

More from Medium

What And Why React.js

Yet another Word Game

React Components