@looped/hooks
v0.1.3
Published
A library of useful react hooks
Downloads
70
Readme
@looped/hooks
A library of useful react hooks
Included Hooks
- useDebounce
- useDelayed
- useGlobalMemo
- useGlobalState
- useIsMobile
- useIsSSR
- useLoading
- useInterval
- useMemoIf
- useLocalstorage
- useDefined
- useControlled
Installation
yarn add @looped/hooks
Usage
import { useDebounce, useDelayed, ... } from '@looped/hooks';
let Component = () => {
let { debouncedValue, value, setValue } = useDebounce('hello', 500);
return (
<div>
<input value={value} onChange={e => setValue(e.target.value)} />
<p>{debouncedValue}</p>
</div>
);
};