0.0.6 • Published 2 years ago
react-hooks-elib v0.0.6
React Hooks Elib
A collection of hooks and utilities for React.
Features 🚀
🔮 Typescript
Written in typescript so you get the advantage of strong type safety
🧠 Server Side Ready
All hooks handle SSR rendering and work well with frameworks like Next/Gatsby
Installation
npm i react-hooks-elib
# or
yarn add react-hooks-elib
CodeSandbox
Refer to this CodeSandbox for usage reference.
Hooks
List of hooks included in the library so far.
useWindowSize
— Tracks browserWindow
dimensionsuseWindowScroll
— TracksWindow
scroll position.useToggle
anduseBoolean
— Tracks and manages state of a booleanuseClipboard
— Hook to work with the clipboarduseLocalStorage
— Hook to work with the local storage API. Supports syncing local storage values across tabs and rerender on changeuseWindowSize
—useWindowScroll
—useWindowEvent
—useTimeout
—useSafeLayoutEffect
—usePrevious
—useConst
—useMergeRefs
—useInterval
—useLatestRef
—useCallbackRef
—