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
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,17 @@ argument for the hooks.
151
151
|**threshold**| number \| number[]| 0 | false | Number between 0 and 1 indicating the percentage that should be visible before triggering. Can also be an array of numbers, to create multiple trigger points. |
152
152
|**triggerOnce**| boolean | false | false | Only trigger this method once |
153
153
154
+
> ⚠️ When passing an array to `threshold`, store the array in a constant to avoid
155
+
> the component re-rendering too often. For example:
156
+
157
+
```js
158
+
constTHRESHOLD= [0.25, 0.5, 0.75]; // Store multiple thresholds in a constant
0 commit comments