Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vorlefan/react-hooks

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vorlefan/react-hooks

Useful react hooks for React & Next.js app

  • 1.0.9
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

@vorlefan/react-hooks

*Useful react hooks for React & Next.js app*

NPM JavaScript Style Guide

Install

npm install --save @vorlefan/react-hooks
yarn add  @vorlefan/react-hooks

Usage

Ir covers up a range of case. Take a look at the list of hooks and some uses of each one.

useAsync

  • Handle with async functions at easy
  • If you want to handle with heavy functions or methods that requires a time to be working well

useBoolean

  • Better way and with a nice semantic to handle Boolean states

useClient

  • Only useful if you are handling with apps that it's Server-Side as Next.js.

useDebounce

  • For functions that the user can call any time

useFetch

  • Hook to do requests on API with a complete suit of options as well handling each state of a 'call'.

useIndex

  • With this you can handle with 'Pagination' or whatever use the concept of 'Page Index', 'Per Page'

useLocalStorage

  • Save values it and get the values on LocalStorage

useMiddleMouse

  • Identify if the user is using the MiddleMouse (scrolling)

useMouseOut

  • Identify if the mouse cursor is out of the range of the element

useMouseIn

  • Identify if the mosue cursor is inside of the range of the element

useObject

  • Complete suit to handle with Object elements.

useScreenSize

  • Identify the size of the Window and the orientation of the screen.

useScroll

  • Identify the state of the scroll of the page

useToggle

  • Useful to handle with Toggle elements like 'Tabs' and so on.

Documentation

Every hooks has their documentation under the folder 'docs' of this repository.

I recommend to look at the 'example' project on 'example' folder of this repository. To install it, just clone the folder and run up:

 npm install & npm run build & npm run start

License

MIT © DaxSoft


This hook is created using create-react-hook.

FAQs

Package last updated on 05 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc