
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
react-notify-resize
Advanced tools
React Element that notifies you whenever it is resized - by any means.
It can be used as a function that takes a component and returns a ResizeNotifier
.
Or as a high order component that takes as prop factory
a component.
You can be notified of resize by two means:
onResize
method it will be called when resizedonResize
calledwhen element resizedExample:
import resizeNotifier from 'react-notify-resize'
class MyComponent extends React.Component {
render(){
// the element you want to listen for resize must have position relative
return <div style={{position: 'relative'}}>
{
// Include this helper inside the element you want to listen for resize
// It renders two divs, with position absolute
this.props.resizeTool
}
</div>
}
// will be called on resize if it is defined
onResize(){
// do something on resize
}
}
const MyNotifiedComponent = resizeNotifier(MyComponent)
<MyNotifiedComponent onResize={/* event called when elementchanges dimension */}
import MyComponent from './MyComponent'
import resizeNotifier from 'react-notify-resize'
const MyNotifiedComponent = resizeNotifier(MyComponent)
import MyComponent from './MyComponent'
import { ResizeNotifier } from 'react-notify-resize'
class SomeComponent extends React.Component {
render(){
return <ResizeNotifier factory={MyComponent} />
}
}
Returned Component from resizeNotifier
Property | Type | Default | Description |
---|---|---|---|
onResize | Function | - | called when component changes |
ResizeNotifier
Component
Property | Type | Default | Description |
---|---|---|---|
factory | React Component | - | component to decorate |
FAQs
### No longer supported
The npm package react-notify-resize receives a total of 3,711 weekly downloads. As such, react-notify-resize popularity was classified as popular.
We found that react-notify-resize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.