
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
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
component that renders passed Component,
Or a component that you pass your component as factory.
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
}
}
cosnt 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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.