You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This where we set our scrollable root component.
88
+
ref={rootRef}
89
+
>
90
+
<List>
91
+
{items.map((item) => (
92
+
<ListItem key={item.key}>{item.value}</ListItem>
93
+
))}
94
+
{hasNextPage && (
95
+
<ListItem ref={infiniteRef}>
96
+
<Loading />
97
+
</ListItem>
98
+
)}
99
+
</List>
100
+
</ListContainer>
101
+
);
102
+
}
103
+
```
71
104
72
-
-**loading:** Some sort of "fetching" info of the request.
73
-
-**hasNextPage:** If the list has more items to load.
74
-
-**onLoadMore:** The callback function to execute when the threshold is exceeded.
75
-
-**threshold:** Maximum distance to bottom of the window/parent to trigger the callback. Default is 150.
76
-
-**checkInterval:** Frequency to check the dom. Default is 200.
77
-
-**scrollContainer:** May be `"window"` or `"parent"`. Default is `"window"`. If you want to use a scrollable parent for the infinite list, use `"parent"`.
105
+
You can find different layout examples **[here](https://github.com/onderonur/react-infinite-scroll-hook/tree/master/example/examples)**. **[Live demo](https://onderonur.github.io/react-infinite-scroll-hook/)** contains all of these cases.
106
+
107
+
## Arguments
108
+
| Name | Description | Type | Optional | Default Value |
0 commit comments