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

@reach/rect

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/rect - npm Package Compare versions

Comparing version 0.15.0 to 0.15.2

9

dist/reach-rect.cjs.dev.js

@@ -110,6 +110,3 @@ 'use strict';

var onChangeRef = React.useRef(onChange);
var stableOnChange = React.useCallback(function (rect) {
onChangeRef.current && onChangeRef.current(rect);
}, []); // eslint-disable-next-line react-hooks/exhaustive-deps
var onChangeRef = React.useRef(onChange); // eslint-disable-next-line react-hooks/exhaustive-deps

@@ -150,3 +147,3 @@ useIsomorphicLayoutEffect.useIsomorphicLayoutEffect(function () {

observer = observeRect__default['default'](elem, function (rect) {
stableOnChange(rect);
onChangeRef.current == null ? void 0 : onChangeRef.current(rect);
setRect(rect);

@@ -160,3 +157,3 @@ });

}
}, [observe, element, nodeRef, stableOnChange]);
}, [observe, element, nodeRef]);
return rect;

@@ -163,0 +160,0 @@ }

@@ -84,6 +84,3 @@ 'use strict';

var onChangeRef = React.useRef(onChange);
var stableOnChange = React.useCallback(function (rect) {
onChangeRef.current && onChangeRef.current(rect);
}, []); // eslint-disable-next-line react-hooks/exhaustive-deps
var onChangeRef = React.useRef(onChange); // eslint-disable-next-line react-hooks/exhaustive-deps

@@ -121,3 +118,3 @@ useIsomorphicLayoutEffect.useIsomorphicLayoutEffect(function () {

observer = observeRect__default['default'](elem, function (rect) {
stableOnChange(rect);
onChangeRef.current == null ? void 0 : onChangeRef.current(rect);
setRect(rect);

@@ -131,3 +128,3 @@ });

}
}, [observe, element, nodeRef, stableOnChange]);
}, [observe, element, nodeRef]);
return rect;

@@ -134,0 +131,0 @@ }

@@ -1,2 +0,2 @@

import { useRef, useEffect, useState, useCallback } from 'react';
import { useRef, useEffect, useState } from 'react';
import PropTypes from 'prop-types';

@@ -100,6 +100,3 @@ import observeRect from '@reach/observe-rect';

var onChangeRef = useRef(onChange);
var stableOnChange = useCallback(function (rect) {
onChangeRef.current && onChangeRef.current(rect);
}, []); // eslint-disable-next-line react-hooks/exhaustive-deps
var onChangeRef = useRef(onChange); // eslint-disable-next-line react-hooks/exhaustive-deps

@@ -140,3 +137,3 @@ useIsomorphicLayoutEffect(function () {

observer = observeRect(elem, function (rect) {
stableOnChange(rect);
onChangeRef.current == null ? void 0 : onChangeRef.current(rect);
setRect(rect);

@@ -150,3 +147,3 @@ });

}
}, [observe, element, nodeRef, stableOnChange]);
}, [observe, element, nodeRef]);
return rect;

@@ -153,0 +150,0 @@ }

{
"name": "@reach/rect",
"version": "0.15.0",
"version": "0.15.2",
"description": "Measure React elements position in the DOM",

@@ -17,6 +17,6 @@ "author": "React Training <hello@reacttraining.com>",

"@reach/observe-rect": "1.2.0",
"@reach/utils": "0.15.0",
"@reach/utils": "0.15.2",
"prop-types": "^15.7.2",
"tiny-warning": "^1.0.3",
"tslib": "^2.1.0"
"tslib": "^2.3.0"
},

@@ -42,3 +42,3 @@ "devDependencies": {

],
"gitHead": "1449650359c119c1afe25973aa7584e09e2c88bc"
"gitHead": "353f409a296a648c4fe2c2d06b14a39b7b6dc3e1"
}
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