Socket
Socket
Sign inDemoInstall

react-measure

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-measure - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

6

CHANGELOG.md
## CHANGELOG
### 2.2.1
Fix `ResizeObserver` callback error
Fix `eslint` warnings
### 2.2.0

@@ -4,0 +10,0 @@

7

dist/index.cjs.js

@@ -11,3 +11,2 @@ 'use strict';

var react = require('react');
var react__default = _interopDefault(react);
var PropTypes = _interopDefault(require('prop-types'));

@@ -109,4 +108,6 @@ var ResizeObserver = _interopDefault(require('resize-observer-polyfill'));

};
_this._resizeObserver = new ResizeObserver(_this.measure);
_this._animationFrameID = null;
_this._resizeObserver = new ResizeObserver(function () {
_this.measure();
});

@@ -190,3 +191,3 @@ _this.measure = function (entries) {

var Measure = withContentRect()(function Measure(_ref) {
var Measure = withContentRect()(function (_ref) {
var measure = _ref.measure,

@@ -193,0 +194,0 @@ measureRef = _ref.measureRef,

@@ -101,4 +101,6 @@ import _extends from '@babel/runtime/helpers/esm/extends';

};
_this._resizeObserver = new ResizeObserver(_this.measure);
_this._animationFrameID = null;
_this._resizeObserver = new ResizeObserver(function () {
_this.measure();
});

@@ -182,3 +184,3 @@ _this.measure = function (entries) {

var Measure = withContentRect()(function Measure(_ref) {
var Measure = withContentRect()(function (_ref) {
var measure = _ref.measure,

@@ -185,0 +187,0 @@ measureRef = _ref.measureRef,

@@ -10,3 +10,2 @@ (function (global, factory) {

_inheritsLoose = _inheritsLoose && _inheritsLoose.hasOwnProperty('default') ? _inheritsLoose['default'] : _inheritsLoose;
var react__default = 'default' in react ? react['default'] : react;
PropTypes = PropTypes && PropTypes.hasOwnProperty('default') ? PropTypes['default'] : PropTypes;

@@ -1130,4 +1129,6 @@

};
_this._resizeObserver = new index(_this.measure);
_this._animationFrameID = null;
_this._resizeObserver = new index(function () {
_this.measure();
});

@@ -1211,3 +1212,3 @@ _this.measure = function (entries) {

var Measure = withContentRect()(function Measure(_ref) {
var Measure = withContentRect()(function (_ref) {
var measure = _ref.measure,

@@ -1214,0 +1215,0 @@ measureRef = _ref.measureRef,

{
"name": "react-measure",
"version": "2.2.0",
"version": "2.2.1",
"description": "Compute measurements of React components.",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

@@ -1,8 +0,8 @@

import React from 'react'
import PropTypes from 'prop-types'
import withContentRect from './with-content-rect'
const Measure = withContentRect()(function Measure ({ measure, measureRef, contentRect, children }) {
return children({ measure, measureRef, contentRect })
})
const Measure = withContentRect()(
({ measure, measureRef, contentRect, children }) =>
children({ measure, measureRef, contentRect })
)

@@ -9,0 +9,0 @@ Measure.displayName = 'Measure'

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

import React, { Component, createElement } from 'react'
import { Component, createElement } from 'react'
import PropTypes from 'prop-types'

@@ -32,6 +32,8 @@ import ResizeObserver from 'resize-observer-polyfill'

_resizeObserver = new ResizeObserver(this.measure)
_animationFrameID = null
_resizeObserver = new ResizeObserver(() => {
this.measure()
})
componentWillUnmount() {

@@ -38,0 +40,0 @@ if (this._resizeObserver) {

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