react-debounced-input

A React input component supporting debounce

Usage no npm install needed!

<script type="module">
  import reactDebouncedInput from 'https://cdn.skypack.dev/react-debounced-input';
</script>

README

A debounced input control built for use with React.

New version: 0.4.0

  • Now using an instance property on the component thanks to some feedback.

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 />

PropTypes:

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](https://github.com/admmasters/react-debounced-input.git "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! :-)