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
@@ -25,6 +25,8 @@ or NPM:
25
25
npm install react-intersection-observer --save
26
26
```
27
27
28
+
> You also want to add the [intersection-observer](https://www.npmjs.com/package/react-intersection-observer) polyfill for full browser support. Check out adding the [polyfill](#polyfill) for details.
29
+
28
30
## Usage
29
31
30
32
### Child as function
@@ -69,7 +71,7 @@ export default Component
69
71
### OnChange callback
70
72
71
73
You can monitor the onChange method, and control the state in your own
72
-
component.
74
+
component. This works with plain children, child as function or render props.
73
75
74
76
```js
75
77
importObserverfrom'react-intersection-observer'
@@ -99,25 +101,28 @@ The **`<Observer />`** accepts the following props:
99
101
|**triggerOnce**| Bool | false | false | Only trigger this method once |
100
102
|**onChange**| Func || false | Call this function whenever the in view state changes |
0 commit comments