Skip to content

Commit 213318d

Browse files
committed
Updated Documentation
1 parent 4b80e00 commit 213318d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<td><img src="https://raw.githubusercontent.com/iNerdStack/react-native-flexible-grid/main/example/assets/gifs/gridboard-overflow-example.gif" alt="Grid Board Example" width="403px" height="100%" /></td>
4040
</tr>
4141
<tr>
42-
<td align="center"> <a href="https://github.com/iNerdStack/react-native-flexible-grid/blob/main/example/src/PinterestHomeExample.tsx">Grid Board Example </a> </td>
42+
<td align="center"> <a href="https://github.com/iNerdStack/react-native-flexible-grid/blob/main/example/src/GridBoardExample.tsx">Grid Board Example </a> </td>
4343
</tr>
4444
</table>
4545

@@ -201,8 +201,7 @@ export default function App() {
201201
<td><code>Number</code></td>
202202
<td><code>50</code></td>
203203
<td><code>true</code></td>
204-
<td> Defines the base unit size for grid items. The actual displayed size of each item in the grid is calculated by multiplying this unit by the item's <code>widthRatio </code> and <code>
205-
heightRatio</code> </td>
204+
<td> Defines the base unit size for grid items. The actual displayed size of each item in the grid is calculated by multiplying this unit by the item's <code>widthRatio</code> and <code>heightRatio</code> </td>
206205
</tr>
207206
<tr>
208207
<td><code>virtualization</code></td>

example/src/GridBoardExample.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FlexGrid } from 'react-native-flexible-grid';
77

88
export default function GridBoardExamplePage() {
99
//generate sample data
10-
const data = React.useMemo(() => {
10+
const data = () => {
1111
const items = [];
1212

1313
for (let i = 0; i < 120; i++) {
@@ -36,7 +36,7 @@ export default function GridBoardExamplePage() {
3636
}
3737

3838
return items;
39-
}, []);
39+
};
4040

4141
const renderItem = (item: any, _: number) => {
4242
return (
@@ -157,7 +157,7 @@ export default function GridBoardExamplePage() {
157157
<FlexGrid
158158
maxColumnRatioUnits={60}
159159
itemSizeUnit={60}
160-
data={data}
160+
data={data()}
161161
virtualizedBufferFactor={2}
162162
renderItem={renderItem}
163163
virtualization={true}

0 commit comments

Comments
 (0)