1.0.0 • Published 5 years ago
react-debounce-on-change v1.0.0
react-debounce-on-change
Component which debounces change events raised by the child component.
Install
npm install --save react-debounce-on-change
Usage
import React, { Component } from 'react'
import DebounceOnChange from 'react-debounce-on-change'
class Example extends Component {
render () {
return (
<DebounceOnChange
wait={1000}
value={this.state.value}
onChange={(e) => {
this.setState({value : e.target.value})
}}
extractValue={e => e.target.value}
>
<input type="text" placeholder="Enter text here" />
</DebounceOnChange>
)
}
}
License
MIT © rmeschian
1.0.0
5 years ago