use-utils
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

use-utils

A utility hooks for react projects

Install

$ npm install use-utils

OR

$ yarn add use-utils

Documentation

  • useDebounce — Debounce any value (primitive value, object etc) or debounce any function with custom delay.

  • useFetch — Utility which provides fetch API's as hook version.

  • useInfiniteScroll — Infinite scroll functionality in hook form.

  • useNetworkStatus — Check online/offline status (your device is connected to internet or not).

  • usePrevValue — Store value which will used in next render (Kind of prevProps & prevState).

  • useSetState — Mimicking a class based setState function with hook.

  • useSetStateWithCallback — setState with callback (Note: we can mimick setState callback, read docs for more info why).

  • useToggle — Utility toggling state for any switch, modal, on/off functionality.

  • useWindowSizes — Get current window sizes in any component.

Package Sidebar

Install

npm i use-utils

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

37.5 kB

Total Files

42

Last publish

Collaborators

  • meet-patel