Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-intersection-observer

Package Overview
Dependencies
Maintainers
1
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intersection-observer - npm Package Compare versions

Comparing version 9.5.2 to 9.5.3

5

esm/index.js

@@ -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() {

1

index.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc