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
/** The element that is used as the viewport for checking visibility of the target. Defaults to the browser viewport if not specified or if null.*/
27
-
root: PropTypes.shape({
28
-
id: PropTypes.string,
29
-
getAttribute: PropTypes.func,
30
-
}),
25
+
threshold: PropTypes.oneOfType([
26
+
PropTypes.arrayOf(PropTypes.number),
27
+
PropTypes.number,
28
+
]),
29
+
/** The HTMLElement that is used as the viewport for checking visibility of the target. Defaults to the browser viewport if not specified or if null.*/
30
+
root: PropTypes.object,
31
31
/** Margin around the root. Can have values similar to the CSS margin property, e.g. "10px 20px 30px 40px" (top, right, bottom, left). */
32
32
rootMargin: PropTypes.string,
33
+
/** Unique identifier for the root element - This is used to identify the IntersectionObserver instance, so it can be reused.
34
+
* If you defined a root element, without adding an id, it will create a new instance for all components. */
35
+
rootId: PropTypes.string,
33
36
/** Call this function whenever the in view state changes */
34
37
onChange: PropTypes.func,
35
38
/** Use render method to only render content when inView */
@@ -82,12 +85,16 @@ class Observer extends Component {
0 commit comments