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

react-resize-detector

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-resize-detector - npm Package Compare versions

Comparing version 6.0.0-alpha.0 to 6.0.0-alpha.1

build/index.d.ts

49

package.json
{
"name": "react-resize-detector",
"description": "React resize detector",
"main": "build/index.js",
"module": "build/index.esm.js",
"files": [
"build"
],
"types": "build/index.d.ts",
"repository": {

@@ -9,12 +15,9 @@ "type": "git",

"scripts": {
"build": "npm link react react-dom && npm run build:cjs && npm run build:esm",
"build:cjs": "babel src --out-dir lib",
"build:esm": "cross-env BABEL_ENV=esm babel src --out-dir lib/esm",
"clean": "rimraf lib",
"lint": "eslint -c .eslintrc src",
"test": "npm run lint && npm run clean && npm run build"
"build": "rollup -c",
"link": "npm link react react-dom",
"prerelease": "npm version premajor --preid=alpha"
},
"dependencies": {
"lodash": "^4.17.20",
"prop-types": "^15.7.2",
"lodash.debounce": "^4.0.8",
"lodash.throttle": "^4.1.1",
"raf-schd": "^4.0.2",

@@ -26,16 +29,24 @@ "resize-observer-polyfill": "^1.5.1"

"@babel/core": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-inject": "^4.0.2",
"@rollup/plugin-node-resolve": "^11.0.1",
"@types/lodash": "^4.14.167",
"@types/raf-schd": "^4.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/resize-observer-browser": "^0.1.4",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"babel-eslint": "^10.0.3",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-transform-imports": "^2.0.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"cross-env": "^7.0.3",
"eslint": "^7.17.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0",
"rimraf": "^3.0.0"
"rimraf": "^3.0.0",
"rollup": "^2.36.1",
"rollup-plugin-typescript2": "^0.29.0",
"tslint": "^6.1.3",
"typescript": "^4.1.3"
},

@@ -47,3 +58,3 @@ "peerDependencies": {

"author": "Vitalii Maslianok <maslianok@gmail.com> (https://github.com/maslianok)",
"version": "6.0.0-alpha.0",
"version": "6.0.0-alpha.1",
"bugs": {

@@ -62,8 +73,6 @@ "url": "https://github.com/maslianok/react-resize-detector/issues"

"license": "MIT",
"main": "lib/index.js",
"module": "lib/esm/index.js",
"sideEffects": false,
"maintainers": [
{
"name": "maslianok",
"name": "Vitalii Maslianok",
"email": "maslianok@gmail.com"

@@ -70,0 +79,0 @@ }

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

# Handle element resizes like it's 2020!
# Handle element resizes like it's 2021!

@@ -8,8 +8,17 @@ <img src="https://img.shields.io/npm/dy/react-resize-detector?style=flat-square">

Nowadays browsers have started to support element resize handling natively using [ResizeObservers](https://wicg.github.io/ResizeObserver/). We use this feature (with a [polyfill](https://github.com/que-etc/resize-observer-polyfill)) to help you handle element resizes in React.
No `window.resize` listeners! No timeouts! Just a pure implementation with a lightning-fast polyfill!
Nowadays browsers support element resize handling natively using [ResizeObservers](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver). The library uses these observers to help you handle element resizes in React.
🐥 Tiny [~6kb](https://bundlephobia.com/result?p=react-resize-detector)
🐼 Written in TypeScript
🦁 Supports Function and Class Components
🐠 Trusted by [many different projects](https://www.npmjs.com/browse/depended/react-resize-detector)
No `window.resize` listeners! No timeouts! No 👑 viruses! :)
## Installation
```
```ssh
npm i react-resize-detector

@@ -20,2 +29,11 @@ // OR

and
```jsx
import ResizeObserver from 'react-resize-detector';
// or, in case you need IE support and ready to load extra kilobytes
import ResizeObserver from 'react-resize-detector/withPolyfill';
```
## Examples

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

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