Useful react hooks for React & Next.js app This is my first react package This is my first attempt with TypeScript
@vorlefan/react-hooks is my first package that I have build for React. It's come from the needs of my person when creating a website that uses (Next.js). I was requiring hooks that works well in both server/client side.
And to take a good learning from this, I have decided to create this package with TypeScript, since I never used it xD. I shall really thank you, dear visitor, if you can provide me with feedbacks (issues and pull request).
Thanks for watching <3
npm install --save @vorlefan/react-hooks
yarn add @vorlefan/react-hooks
bundlephobia Minified: 8.6kB Minified + GZIPPED: 2.6kB
Checkout the 'docs' folder
useBoolean
: Handler for Boolean valuesuseObject
: Handler for Object valuesuseLocalStorage
: Save & load things on Local StorageuseFetch
: Request API with any fetch library that you want to (node-fetcher, isomorphic-unfetch, fetch)useMiddleMouse
: Check the wheel of the MouseuseMouseIn
: Check if the mouse is 'in or out' of a HTMLElementuseDebounce
: Invokes a debounce functionuseIndex
: Handler for pagination elementsuseToggle
: Handler for elements that only appers when some variable is trueuseScreenSize
: Handler to get the size of the windows screen. Useful to create responsive appuseScroll
: Handler to get informations about the scrolling of the screen
MIT © DaxSoft
This hook is created using create-react-hook.