Gathering detailed insights and metrics for @jameswomack/react-resize-detector
Gathering detailed insights and metrics for @jameswomack/react-resize-detector
npm install @jameswomack/react-resize-detector
Typescript
Module System
Node Version
NPM Version
67.1
Supply Chain
86.5
Quality
74.7
Maintenance
100
Vulnerability
100
License
TypeScript (89.72%)
CSS (5.91%)
JavaScript (3.46%)
HTML (0.91%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
671
Last Day
1
Last Week
2
Last Month
11
Last Year
62
MIT License
1,267 Stars
529 Commits
92 Forks
10 Watchers
4 Branches
37 Contributors
Updated on Feb 10, 2025
Minified
Minified + Gzipped
Latest Version
1.0.0-beta.0
Package Id
@jameswomack/react-resize-detector@1.0.0-beta.0
Size
29.78 kB
NPM Version
5.4.2
Node Version
8.6.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-50%
2
Compared to previous week
Last Month
120%
11
Compared to previous month
Last Year
-54.1%
62
Compared to previous year
1
1
Please, file an issue if something went wrong or let me know via Twitter @maslianok
This implementation does NOT use an internal timer to detect size changes (as most implementations do). It uses scroll events. Inspired by this article Cross-Browser, Event-based, Element Resize Detection written by Back Alley Coder
Local demo:
git clone https://github.com/maslianok/react-resize-detector.git
cd react-resize-detector/example
npm i && npm start
npm i react-resize-detector
npm t
1import React, {Component} from 'react'; 2import {render} from 'react-dom'; 3import ReactResizeDetector from 'react-resize-detector'; 4 5class App extends Component { 6 render() { 7 return ( 8 <div> 9 ... 10 <ReactResizeDetector handleWidth handleHeight onResize={this._onResize} /> 11 </div> 12 ); 13 } 14 15 _onResize = () => { 16 ... 17 } 18} 19 20render(<App />, document.getElementById('root')); 21
(Bool) Trigger onResize
on width change
(Bool) Trigger onResize
on height change
(Func) Function that will be invoked with width
and height
arguments. When handling only one of dimensions, other argument will be undefined
.
MIT
No vulnerabilities found.
Reason
16 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 3/5 approved changesets -- score normalized to 6
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More