1.0.0 • Published 6 years ago

react-convenience v1.0.0

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

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago