rat

react-after-typing

Do something right after user stop typing

Showing:

Popularity

Downloads/wk

32

GitHub Stars

0

Maintenance

Last Commit

4yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.8KB

License

MIT

Type Definitions

Tree-Shakeable

Yes?

Categories

Readme

react-after-typing

This HOC add a callback function to an input component. The function is called right after the user stop typing.

What it solves

Some uses case are instant form validation and applying a filter to a list.

Usage

$ yarn add react-after-typing
import afterTyping from 'react-after-typing':

// Define your input
const Input = props => (
  <input type="text" {...props} />
);

// Enhance it
const InputWithCallback = afterTyping(Input);
// Add the callback prop
render() {
  return (
    <InputWithCallback afterTyping={() => console.log('Hola')}/>
  )
}

< EnhancedInput />

Props

  • afterTyping: Function

    The the function to be called.

  • time: Integer

    Optional. Number of ms waited before firing the function, defaults to 500.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100