Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/react-virtualized

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-virtualized

TypeScript definitions for react-virtualized

  • 9.21.30
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @types/react-virtualized?

@types/react-virtualized provides TypeScript definitions for the react-virtualized library, which is used for efficiently rendering large lists and tabular data by only rendering visible items.

What are @types/react-virtualized's main functionalities?

List

The List component is used to render a large number of rows efficiently by only rendering the rows that are visible within the viewport.

import { List, ListRowRenderer } from 'react-virtualized';

const rowRenderer: ListRowRenderer = ({ index, key, style }) => (
  <div key={key} style={style}>
    Row {index}
  </div>
);

const MyList = () => (
  <List
    width={300}
    height={300}
    rowCount={1000}
    rowHeight={20}
    rowRenderer={rowRenderer}
  />
);

Grid

The Grid component is used to render a large grid of items efficiently by only rendering the cells that are visible within the viewport.

import { Grid, GridCellRenderer } from 'react-virtualized';

const cellRenderer: GridCellRenderer = ({ columnIndex, key, rowIndex, style }) => (
  <div key={key} style={style}>
    Cell {rowIndex},{columnIndex}
  </div>
);

const MyGrid = () => (
  <Grid
    columnCount={100}
    columnWidth={100}
    height={300}
    rowCount={100}
    rowHeight={30}
    width={300}
    cellRenderer={cellRenderer}
  />
);

Table

The Table component is used to render tabular data efficiently by only rendering the rows and columns that are visible within the viewport.

import { Column, Table } from 'react-virtualized';

const MyTable = () => (
  <Table
    width={300}
    height={300}
    headerHeight={20}
    rowHeight={30}
    rowCount={100}
    rowGetter={({ index }) => ({ name: `Name ${index}`, age: index })}
  >
    <Column label='Name' dataKey='name' width={100} />
    <Column label='Age' dataKey='age' width={100} />
  </Table>
);

Other packages similar to @types/react-virtualized

FAQs

Package last updated on 10 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc