8000 GitHub - Wroud/go-virtualize: Virtualize big data for React
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 29, 2024. It is now read-only.

Wroud/go-virtualize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-virtualize

Virtualize big data for React

Install

npm i go-virtualize
yarn add go-virtualize

Usage

import { Virtualize, VirtualizedComponentProps } from "go-virtualize";

function Row({ column, row, children, key }: VirtualizedComponentProps) {
  return (
    <div key={key} className="row">
      {children}
    </div>
  );
}

function Column({ column, row, key }: VirtualizedComponentProps) {
  return (
    <div key={key} className="column">
      {column}, {row}
    </div>
  );
}

function App() {
  return (
    <div className="App">
      <Virtualize
        style={{ width: "100%", height: "100%", backgroundColor: "#ccc" }}
        rows={100000}
        columns={10000}
        row={Row}
        column={Column}
        avgHeight={30}
        avgWidth={200}
      />
    </div>
  );
}

Live

About

Virtualize big data for React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0