React Table (https://react-table.js.org) is a flexible table component for React apps. It has many useful features, such as filtering, sorting, and pivoting. Let's use the GitHub REST API app that we created in Chapter 8, Consuming the REST API with React:
- To install the react-table component, open PowerShell and move to the restgithub folder, which is the root folder of the app. Install the component by typing the following command:
npm install react-table
- Open the App.js file with VS Code and remove tablerows and the table inside the return. Now, the App.js file should appear as follows:
import React, { useState } from 'react';
import './App.css';
function App() {
const [data, setData] = useState([]);
const [keyword, setKeyword] = useState('');
const fetchData = () => {
const url = `https://api.github.com/search...