1.1.0 • Published 3 years ago

use-stop-typing v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

useStopTyping

React hook for running callback when input stops.

Installation

npm install use-stop-typing

Usage

In this example, 'console.log("Update")' will be executed 2000ms after the input is stopped!

import { useRef } from 'react';
import { useStopTyping } from 'use-stop-typing';

export default () => {
  const ref = useRef<HTMLInputElement>(null);
  useStopTyping(ref, () => console.log('Update'), 2000);

  return (
    <input type="text" ref={ref} />
  )
}

LICENSE

MIT

1.1.0

3 years ago

1.0.11

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago