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: packages/core/src/bundle/hooks/useIntersectionObserver/useIntersectionObserver.js
+4-5
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,10 @@ import { useRefState } from '../useRefState/useRefState';
7
7
* @category Browser
8
8
*
9
9
* @overload
10
-
* @template Target The target element
11
-
* @param {Target} target The target element to detect intersection
10
+
* @param {HookTarget} target The target element to detect intersection
12
11
* @param {boolean} [options.enabled=true] The IntersectionObserver options
13
12
* @param {((entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void) | undefined} [options.onChange] The callback to execute when intersection is detected
14
-
* @param {IntersectionObserverInit['root'] | RefObject<Element | null | undefined>} [options.root] The root element to observe
13
+
* @param {HookTarget} [options.root] The root element to observe
15
14
* @returns {UseIntersectionObserverReturn} An object containing the state and the supported status
16
15
*
17
16
* @example
@@ -21,7 +20,7 @@ import { useRefState } from '../useRefState/useRefState';
21
20
* @template Target The target element
22
21
* @param {boolean} [options.enabled=true] The IntersectionObserver options
23
22
* @param {((entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void) | undefined} [options.onChange] The callback to execute when intersection is detected
24
-
* @param {IntersectionObserverInit['root'] | RefObject<Element | null | undefined>} [options.root] The root element to observe
23
+
* @param {HookTarget} [options.root] The root element to observe
25
24
* @returns {UseIntersectionObserverReturn & { ref: StateRef<Target> }} A React ref to attach to the target element
0 commit comments