A React input component supporting debounce
npm install react-debounced-inputA debounced input control built for use with React.
New version: 0.4.0
Installation:
The easiest way to install the component is to use NPM and insert into your React build process:
npm install react-debounced-input --save
Usage:
To use the component (ES6 module syntax):
import ReactDebouncedInput from 'react-debounced-input'
const Example = props => <ReactDebouncedInput />
ReactDebouncedInput.defaultProps = {
type: 'text',
};
ReactDebouncedInput.propTypes = {
type: PropTypes.string.isRequired,
onChange: PropTypes.func,
debounce: PropTypes.number,
onDebounce: PropTypes.func,
placeholder: PropTypes.string,
className: PropTypes.string,
};
Examples
To run the example(s) clone the repo and then use NPM scripts to start a dev server
npm install
npm run dev
We are pull request friendly - as this is definitely a v1 API! :-)