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.5.0 to 2.5.1

12

CHANGELOG.md
## CHANGELOG
### 2.5.1
Use `ResizeObserver` of local `window` object #147
### 2.5.0
Set `innerRef` before observing [#140](https://github.com/souporserious/react-measure/pull/140)
### 2.4.0
Use the local `window` object of the observed node [#146](https://github.com/souporserious/react-measure/pull/146)
### 2.3.0

@@ -4,0 +16,0 @@

2

dist/index.cjs.js

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

_proto.componentDidMount = function componentDidMount() {
this._resizeObserver = new ResizeObserver(this.measure);
this._resizeObserver = this.window !== null ? new this._window.ResizeObserver(this.measure) : new ResizeObserver(this.measure);

@@ -176,0 +176,0 @@ if (this._node !== null) {

@@ -167,3 +167,3 @@ import _extends from '@babel/runtime/helpers/esm/extends';

_proto.componentDidMount = function componentDidMount() {
this._resizeObserver = new ResizeObserver(this.measure);
this._resizeObserver = this.window !== null ? new this._window.ResizeObserver(this.measure) : new ResizeObserver(this.measure);

@@ -170,0 +170,0 @@ if (this._node !== null) {

@@ -1230,3 +1230,3 @@ (function (global, factory) {

_proto.componentDidMount = function componentDidMount() {
this._resizeObserver = new index(this.measure);
this._resizeObserver = this.window !== null ? new this._window.ResizeObserver(this.measure) : new index(this.measure);

@@ -1233,0 +1233,0 @@ if (this._node !== null) {

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

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

@@ -42,3 +42,5 @@ import { Component, createElement } from 'react'

componentDidMount() {
this._resizeObserver = new ResizeObserver(this.measure)
this._resizeObserver = this.window !== null
? new this._window.ResizeObserver(this.measure)
: new ResizeObserver(this.measure);
if (this._node !== null) {

@@ -45,0 +47,0 @@ this._resizeObserver.observe(this._node)

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