New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

react-in-viewport

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-in-viewport - npm Package Compare versions

Comparing version

to
0.0.31

@@ -21,3 +21,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var isStateless = function isStateless(Component) {
return !Component.prototype.render;
return typeof Component === 'function' && !(Component.prototype && Component.prototype.isReactComponent);
};

@@ -24,0 +24,0 @@

@@ -37,3 +37,3 @@ 'use strict';

var isStateless = function isStateless(Component) {
return !Component.prototype.render;
return typeof Component === 'function' && !(Component.prototype && Component.prototype.isReactComponent);
};

@@ -40,0 +40,0 @@

{
"name": "react-in-viewport",
"version": "0.0.30",
"version": "0.0.31",
"description": "Track React component in viewport",

@@ -5,0 +5,0 @@ "author": "Roderick Hsiao <roderickhsiao@gmail.com>",

@@ -10,3 +10,6 @@ if (typeof window !== 'undefined') {

const isStateless = Component => !Component.prototype.render;
const isStateless = (Component) => (
typeof Component === 'function'
&& !(Component.prototype && Component.prototype.isReactComponent)
)

@@ -13,0 +16,0 @@ function handleViewport(