1.1.0 • Published 3 years ago

remax-virtual-list v1.1.0

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

remax-virtual-list

用于高效地呈现大型列表和表格数据

remax-virtual-list 完全借鉴了 React Window 的实现,因此基本沿用了 React Window 的用法。

npm npm dev dependency version NPM license

安装

$ npm install remax-virtual-list --save
# 或者用 yarn
$ yarn add remax-virtual-list

使用

import * as React from "react";
import { View } from "remax/one";
import { FixedSizeList } from "remax-virtual-list";

const Row = ({ index, style }) => <View style={style}>Row {index}</View>;

export default () => (
  <FixedSizeList height={150} itemCount={1000} itemSize={35} width={300}>
    {Row}
  </FixedSizeList>
);