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.29
  • ts4.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
357K
decreased by-24.79%
Maintainers
1
Weekly downloads
 
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 06 Dec 2023

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