1.1.0 • Published 2 years ago

use-stop-typing v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

1.0.11

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago