Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@teneff/react-debounce
Advanced tools
Using render props to debounce a callback. Useful for preventing multiple callback executions on scroll, spam-clicking, typing etc.
npm install @teneff/react-debounce
yarn add @teneff/react-debounce
import Debounce from '@teneff/react-debounce';
class MyComponent extends React.Component {
handleClick = () => {
console.info("event handler will be executed once after multiple clicks");
};
handleKeyUp = value => {
console.info("event handler will be executed when you stop typing", value);
};
render() {
return (
<div>
<Debounce callback={this.handleClick} delay={300}>
{onClick => <button onClick={onClick}>click me, wait, profit</button>}
</Debounce>
<Debounce callback={this.handleKeyUp} delay={500}>
{onKeyUp => (
<input
type="text"
onKeyUp={e => onKeyUp(e.target.value)}
placeholder="Start typing..."
/>
)}
</Debounce>
</div>
);
}
}
FAQs
React Debounce Component
The npm package @teneff/react-debounce receives a total of 2 weekly downloads. As such, @teneff/react-debounce popularity was classified as not popular.
We found that @teneff/react-debounce demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.