New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@teneff/react-debounce

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teneff/react-debounce - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "@teneff/react-debounce",
"version": "1.0.0",
"version": "1.0.1",
"description": "React Debounce Component",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -24,2 +24,5 @@ # React <Debounce /> Component

## Live Demo
[![codesandbox-img]][codesandbox-url]
## Usage

@@ -31,11 +34,10 @@

class MyComponent extends React.Component {
handleClick = () => {
console.info("event handler will be executed once after multiple clicks");
};
handleClick = e => {
console.info(e);
}
handleKeyUp = value => {
console.info("event handler will be executed when you stop typing", value);
};
handleKeyUp = e => {
console.info('event handler will be executed when you stop typing', e);
}
render() {

@@ -45,15 +47,15 @@ return (

<Debounce callback={this.handleClick} delay={300}>
{onClick => {
<button onClick={onClick}>
click me, wait, profit
</button>
}}
{onClick => <button onClick={onClick}>click me, wait, profit</button>}
</Debounce>
<Debounce callback={this.handleKeyUp} delay={500}>
{onKeyUp => {
<input onKeyUp={onKeyUp} value="" placeholder="Start typing..." />
}}
{onKeyUp => (
<input
type="text"
onKeyUp={e => onKeyUp(e.target.value)}
placeholder="Start typing..."
/>
)}
</Debounce>
</div>
)
);
}

@@ -79,2 +81,5 @@ }

[github-stars-img]: https://img.shields.io/github/stars/teneff/react-debounce.svg?logo=github&logoColor=fff
[github-stars-url]: https://github.com/teneff/react-debounce/stargazers
[github-stars-url]: https://github.com/teneff/react-debounce/stargazers
[codesandbox-img]: https://codesandbox.io/static/img/play-codesandbox.svg
[codesandbox-url]: https://codesandbox.io/s/927l985x94
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