@alobato/use-debounce

React hook debounce

Usage no npm install needed!

<script type="module">
  import alobatoUseDebounce from 'https://cdn.skypack.dev/@alobato/use-debounce';
</script>

README

useDebounce

React hook debounce

Note: This is using the new React Hooks API

You'll need to install react, react-dom, etc at ^16.8.0 or above

Install

yarn add @alobato/use-debounce

Usage

import useKeyPress from '@alobato/use-debounce'
...
  const [ search, setSearch ] = useState('')
  const debouncedSearch = useDebounce(search, 500)