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

react-visibility-sensor

Package Overview
Dependencies
Maintainers
3
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-visibility-sensor - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

4

CHANGELOG.md
Changelog
====
## 3.0.1
- return the new state from .check method
## 3.0.0

@@ -5,0 +9,0 @@

2

package.json
{
"name": "react-visibility-sensor",
"version": "3.0.0",
"version": "3.0.1",
"description": "Sensor component for React that notifies you when it goes in or out of the window viewport.",

@@ -5,0 +5,0 @@ "main": "visibility-sensor.js",

@@ -117,12 +117,14 @@ 'use strict';

var state = this.state
// notify the parent when the value changes
if (this.state.isVisible !== isVisible) {
this.setState({
state = {
isVisible: isVisible,
visibilityRect: visibilityRect
});
};
this.setState(state);
this.props.onChange(isVisible, visibilityRect);
}
return this.state;
return state;
},

@@ -129,0 +131,0 @@

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