UNPKG

@tarojsx/library

Version:
29 lines (21 loc) 638 B
--- id: react-window title: react-window sidebar_label: react-window --- ## [react-window](https://github.com/bvaughn/react-window) ### 需求 - `requestAnimationFrame` ### 使用 ```jsx import React from 'react' import Taro from '@tarojs/taro' import { View } from '@tarojs/components' import { FixedSizeList } from '@tarojsx/library/dist/react-window' const { windowWidth, windowHeight } = Taro.getSystemInfoSync() const Demo = () => ( <FixedSizeList width={windowWidth} height={windowHeight} itemCount={1000} itemSize={35}> {({ index, style }) => <View style={style}>Row {index}</View>} </FixedSizeList> ) ```