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
Copy file name to clipboardExpand all lines: README.md
+17-12Lines changed: 17 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,30 +13,27 @@ added. An infinite-scroll that actually works and super-simple to integrate!
13
13
var InfiniteScroll = require('react-infinite-scroll-component');
14
14
```
15
15
16
-
# demos
17
-
-[See the demo in action at http://ankeetmaini.github.io/react-infinite-scroll-component/](http://ankeetmaini.github.io/react-infinite-scroll-component/). Thanks [@kdenz](https://github.com/kdenz)!
18
-
- The code for demos is in the `demos/` directory. You can also clone and open `lib/index.html` in your browser to see the demos in action.
19
-
20
16
# using
21
17
22
18
```jsx
23
19
<InfiniteScroll
24
-
pullDownToRefresh
25
20
dataLength={items.length} //This is important field to render the next data
26
-
pullDownToRefreshContent={
27
-
<h3 style={{textAlign:'center'}}>↓ Pull down to refresh</h3>
28
-
}
29
-
releaseToRefreshContent={
30
-
<h3 style={{textAlign:'center'}}>↑ Release to refresh</h3>
31
-
}
32
-
refreshFunction={this.refresh}
33
21
next={fetchData}
34
22
hasMore={true}
35
23
loader={<h4>Loading...</h4>}
36
24
endMessage={
37
25
<p style={{textAlign:'center'}}>
38
26
<b>Yay! You have seen it all</b>
39
27
</p>
28
+
}
29
+
// below props only if you need pull down functionality
30
+
refreshFunction={this.refresh}
31
+
pullDownToRefresh
32
+
pullDownToRefreshContent={
33
+
<h3 style={{textAlign:'center'}}>↓ Pull down to refresh</h3>
34
+
}
35
+
releaseToRefreshContent={
36
+
<h3 style={{textAlign:'center'}}>↑ Release to refresh</h3>
40
37
}>
41
38
{items}
42
39
</InfiniteScroll>
@@ -52,6 +49,14 @@ The `InfiniteScroll` component can be used in three ways.
52
49
# docs version wise
53
50
[3.0.2](docs/README-3.0.2.md)
54
51
52
+
# live examples
53
+
54
+
- infinite scroll (never ending) example using react (body/window scroll)
0 commit comments