We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dc4acf commit 1176743Copy full SHA for 1176743
1 file changed
docs/react-window.mdx
@@ -5,3 +5,26 @@ sidebar_label: react-window
5
---
6
7
## [react-window](https://github.com/bvaughn/react-window)
8
+
9
+### 安装
10
11
+`npm i react-window`
12
13
+`npm i -D @types/react-window`
14
15
+### 使用
16
17
+```jsx
18
+import React from 'react'
19
+import Taro from '@tarojs/taro'
20
+import { View } from '@tarojs/components'
21
+import { FixedSizeList } from 'react-window'
22
23
+const { windowWidth, windowHeight } = Taro.getSystemInfoSync()
24
25
+const Example = () => (
26
+ <FixedSizeList width={windowWidth} height={windowHeight} itemCount={1000} itemSize={35}>
27
+ {({ index, style }) => <View style={style}>Row {index}</View>}
28
+ </FixedSizeList>
29
+)
30
+```
0 commit comments