A CLI-driven React hooks library offering a collection of ready-to-use Typescript hooks that you can easily copy, customize, and integrate into your projects.
npm install -g hoocs
This will create hoocs.json
in the root of your project and help you set destination paths for hooks.
npx hoocs init
npx hoocs add useTheme
npx hoocs list
Need hooks for JavaScript projects? Until we officially support them, there is a simple workaround. After installing, you can change the file extension to
.js
and remove the types from the hook file.
Visit: Hoocs Documentation for detailed information on each hook.
- useCopyToClipboard
- useCounter
- useDebounce
- useDefault
- useDeviceSize
- useDocumentTitle
- useInViewport
- useLockScroll
- useOnline
- usePageVisibility
- usePrevious
- useReducedMotion
- useTabAway
- useTheme
- useWindowSize
Don't see a hook you need? Request a new hook or contribute to the project.
We welcome contributions to Hoocs! Please check out the contribution guide to get started.