Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @ninetynine/react-table with all npm packages installed. Try it out:

require("react/package.json"); // react is a peer dependency. require("react-dom/package.json"); // react-dom is a peer dependency. var reactTable = require("@ninetynine/react-table")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@ninetynine/react-table v1.1.1

A package that provides a managed React table for both static and dynamic data



🗃
react-table





npm version npm license npm total downloads




npm i @ninetynine/react-table







Basic Usage

Table

Use Table when data is not retrieved from an API endpoint. It's simple to get started:

import React from 'react'
import { Table } from '@ninetynine/react-table'

const UsersTable = props => (
  <Table
    {...props}
    rows={[
      {
        id: 1,
        name: 'Leanne Graham'
      },
      {
        id: 2,
        name: 'Ervin Howell'
      }
    ]}
  />
)

export default UsersTable

Read more about customizing Table's functionality here.

AjaxTable

Use AjaxTable when data is being retrieved from an API endpoint. It is built on top of Table with a new minor tweaks:

import React from 'react'
import { AjaxTable } from '@ninetynine/react-table'

const UsersTable = props => (
  <AjaxTable
    {...props}
    url='https://jsonplaceholder.typicode.com/users'
  />
)

export default UsersTable

Read more about customizing AjaxTable's functionality here.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free