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.1.3 to 2.2.0

dist/index.cjs.js

11

CHANGELOG.md
## CHANGELOG
### 2.2.0
Remove `componentWillMount` for React >16 StrictMode compliance
[#121](https://github.com/souporserious/react-measure/pull/121)
Upgrade `get-node-dimensions` package to `1.2.1`
Upgrade `prop-types` package to `15.6.2`
Fixes `disconnect` being used instead of `unobserve` for `ResizeObserver`
### 2.1.3

@@ -4,0 +15,0 @@

49

package.json
{
"name": "react-measure",
"version": "2.1.3",
"version": "2.2.0",
"description": "Compute measurements of React components.",
"main": "lib/react-measure.js",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"files": [
"dist",
"lib"
"src"
],
"scripts": {
"build:lib": "babel src --out-dir lib",
"build": "npm run build:lib && NODE_ENV=production webpack --config webpack.prod.config.js",
"dev": "webpack-dev-server --inline --hot --progress --colors --host 0.0.0.0 --devtool eval",
"postbuild": "NODE_ENV=production TARGET=minify webpack --config webpack.prod.config.js",
"prebuild": "rm -rf dist && mkdir dist",
"prepublish": "npm run build",
"deploy": "NODE_ENV=production TARGET=minify webpack && git-directory-deploy --directory example --branch gh-pages"
"build": "rollup -c",
"prepublishOnly": "npm run build"
},

@@ -44,28 +40,17 @@ "repository": {

"dependencies": {
"get-node-dimensions": "^1.2.0",
"prop-types": "^15.5.10",
"get-node-dimensions": "^1.2.1",
"prop-types": "^15.6.2",
"resize-observer-polyfill": "^1.5.0"
},
"devDependencies": {
"babel-cli": "^6.16.0",
"babel-core": "^6.17.0",
"babel-loader": "^6.2.5",
"babel-preset-es2015": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"chokidar": "^1.6.1",
"css-loader": "^0.25.0",
"git-directory-deploy": "^1.5.1",
"http-server": "^0.11.1",
"node-libs-browser": "^1.0.0",
"node-sass": "^4.9.2",
"postcss-loader": "^0.13.0",
"react": "15.3.2",
"react-dom": "15.3.2",
"react-motion": "^0.4.2",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.1",
"webpack": "^1.13.2",
"webpack-dev-server": "^3.1.5"
"@babel/cli": "^7.2.0",
"@babel/core": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.2.1",
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"@babel/preset-react": "^7.0.0",
"rollup": "^0.67.4",
"rollup-plugin-babel": "^4.1.0",
"rollup-plugin-node-resolve": "^4.0.0"
}
}

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

## React Measure
## 📏 React Measure

@@ -6,6 +6,10 @@ [![npm version](https://badge.fury.io/js/react-measure.svg)](https://badge.fury.io/js/react-measure)

Compute measurements of React components. Uses
[resize-observer-polyfill](https://github.com/que-etc/resize-observer-polyfill)
to detect changes of an element and return the new dimensions.
Compute measurements of React components. Uses a
[`ResizeObserver`](https://developers.google.com/web/updates/2016/10/resizeobserver)
to detect when an element's dimensions have changed.
Includes a
[polyfill for `ResizeObserver`](https://github.com/que-etc/resize-observer-polyfill)
in unsupported browsers.
## Install

@@ -43,6 +47,6 @@

[offsetTop](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop),
[offsetLeft](https://developer.mozilla.org/en-US/docs/Web/API/Element/offsetLeft),
[offsetWidth](https://developer.mozilla.org/en-US/docs/Web/API/Element/offsetWidth),
[offsetLeft](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft),
[offsetWidth](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth),
and
[offsetHeight](https://developer.mozilla.org/en-US/docs/Web/API/Element/offsetHeight).
[offsetHeight](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight).

@@ -182,10 +186,12 @@ #### `scroll`: PropTypes.bool

install dependencies
install package dependencies
`npm install`
`yarn`
run dev mode
move into site folder and install local site dependencies
`npm run dev`
`cd ~/site && yarn`
open your browser and visit: `http://localhost:8080/`
run development mode
`gatsby develop`

Sorry, the diff of this file is not supported yet

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