@esam_alsawah/hooks
v2.1.6
Published
Library provides many hooks
Downloads
35
Readme
Installation
To install my library, run the following command:
npm install @esam_alsawah/hooks
yarn add @esam_alsawah/hooks
- Hooks
useBreakpoint— allows you to easily get the current breakpoint of the screen based on its width.useClipboard— copies text to clipboard.useColorScheme— detects the color scheme of the user's system.useDebounce— debounces a function.useFullScreen— display an element or video full-screen.useHover— tracks mouse hover state of some element.useInterval— allows you to run a function repeatedly at a specified time interval.useMergedRef— merges multiple refs into a single ref.useMouse— tracks state of mouse position.useOs— detects the user's operating system.useScrollIntoView— allows you to easily scroll to an element on the page.useWindowScroll— tracks Window scroll position.useLocalStorage— manages a value in localStorage.useSessionStorage— manages a value in sessionStorage.useViewportSize— allows you to easily get the current size of the browser viewport.useWindowEvent— allows you to add an event listener to the window object in a React component.
Contributing
We welcome contributions to this library! To get started, please follow these steps:
- Fork this repository.
- Make your changes and commit them to a new branch.
- Submit a pull request.
We'll review your changes as soon as possible and provide feedback. Thank you for contributing!
License
This library is released under the MIT License.
