react-intersection-observer
Advanced tools
Comparing version 9.5.2 to 9.5.3
@@ -134,2 +134,6 @@ "use client"; | ||
} | ||
componentDidMount() { | ||
this.unobserve(); | ||
this.observeNode(); | ||
} | ||
componentDidUpdate(prevProps) { | ||
@@ -143,3 +147,2 @@ if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) { | ||
this.unobserve(); | ||
this.node = null; | ||
} | ||
@@ -146,0 +149,0 @@ observeNode() { |
@@ -58,2 +58,3 @@ import * as React from 'react'; | ||
constructor(props: IntersectionObserverProps | PlainChildrenProps); | ||
componentDidMount(): void; | ||
componentDidUpdate(prevProps: IntersectionObserverProps): void; | ||
@@ -60,0 +61,0 @@ componentWillUnmount(): void; |
@@ -171,2 +171,6 @@ "use strict"; | ||
} | ||
componentDidMount() { | ||
this.unobserve(); | ||
this.observeNode(); | ||
} | ||
componentDidUpdate(prevProps) { | ||
@@ -180,3 +184,2 @@ if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) { | ||
this.unobserve(); | ||
this.node = null; | ||
} | ||
@@ -183,0 +186,0 @@ observeNode() { |
{ | ||
"name": "react-intersection-observer", | ||
"version": "9.5.2", | ||
"version": "9.5.3", | ||
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API", | ||
@@ -5,0 +5,0 @@ "source": "./src/index.tsx", |
@@ -257,4 +257,4 @@ # react-intersection-observer | ||
to assist with faking the `inView` state. When setting the `isIntersecting` | ||
value you can pass either a `boolean` value or a threshold between 0 and 1.It | ||
wil emulate the real IntersectionObserver, allowing you to validate that your | ||
value you can pass either a `boolean` value or a threshold between 0 and 1. It | ||
will emulate the real IntersectionObserver, allowing you to validate that your | ||
components are behaving as expected. | ||
@@ -261,0 +261,0 @@ |
@@ -9,3 +9,3 @@ /** | ||
/** | ||
* Rest the IntersectionObserver mock to its initial state, and clear all the elements being observed. | ||
* Reset the IntersectionObserver mock to its initial state, and clear all the elements being observed. | ||
*/ | ||
@@ -12,0 +12,0 @@ export declare function resetIntersectionMocking(): void; |
@@ -77,3 +77,3 @@ "use strict"; | ||
/** | ||
* Rest the IntersectionObserver mock to its initial state, and clear all the elements being observed. | ||
* Reset the IntersectionObserver mock to its initial state, and clear all the elements being observed. | ||
*/ | ||
@@ -80,0 +80,0 @@ function resetIntersectionMocking() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
133946
1300