1.0.0 • Published 5 years ago

react-convenience v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

react-convenience

React Utilities.

installation

Run yarn add react-convenience

Usages

debounceEvent

It delays execution of function, takes 2 argument first is callback and second is delay time.

    import { debounceEvent } from 'react-convenience';
    import { TextArea } from '...';

    const handlerOnChange = e => console.log(e);

    const debouncedHandler = debounceEvent(handlerOnChange, 500);

    <TextArea onChange={debouncedHandler} />

withOnChangeDebounce

HOC to help debounce handler onChange.

    import { withOnChangeDebounce } from 'react-convenience';
    import { TextArea } from '...';

    const TextAreaWithDebounce = withOnChangeDebounce(500)(TextArea);

    const handlerOnChange = e => console.log(e);

    <TextAreaWithDebounce onChange={handlerOnChange} />
1.0.0

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago