Render Props component to debounce the given value.
- 🚀 Dependency free
- 🏄 Extremely tiny
- 🔌 Plug and Play
- 👷 Well tested
- 👔 Built with TypeScript
Example
Install
npm i -S redebounce
APIs
<Redebounce>
Props
Name | Type | Required | Description |
---|---|---|---|
dueTime |
number |
✓ | The timeout duration in milliseconds for the window of time to wait stopping changes of value and provide it to children |
value |
T |
✓ | The value to provide to children . |
children |
(value: T) => ReactNode |
A render props function which provides the value from value |
Usage
; state = value: '' ; { return <div> <input onChange=thisonChangeInput /> <Redebounce dueTime=600 value=thisstatevalue> <input value=value /> </Redebounce> </div> ; } { this; };
License
MIT
Contribute
You can help improving this project leaving Pull requests and helping with Issues.