Skip to content

Commit 7c25f82

Browse files
committed
update readme
1 parent ff7c78e commit 7c25f82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,12 @@ You can read more about this on these links:
240240
241241
```js
242242
const inViewRef = useOnInViewChanged(
243-
(element, entry) => {
243+
(enterEntry) => {
244244
// Do something with the element that came into view
245-
console.log('Element is in view', element);
245+
console.log('Element is in view', enterEntry?.element);
246246

247247
// Optionally return a cleanup function
248-
return (entry) => {
248+
return (exitEntry) => {
249249
console.log('Element moved out of view or unmounted');
250250
};
251251
},

0 commit comments

Comments
 (0)