2018-10-27 13:18:07 +02:00
2018-10-27 13:18:07 +02:00
2018-10-27 13:18:07 +02:00
2018-10-26 23:44:36 +02:00
2018-10-27 12:15:13 +02:00
2018-10-27 12:15:13 +02:00
2018-10-27 13:18:07 +02:00
2018-10-27 12:12:00 +02:00



👍
react-use





Collection of essential React Hooks.
This is mostly port of libreact to React Hooks.


Install

npm i react-use

Reference

  • State
  • Sensors
    • useBattery — tracks device batter state.
    • useGeolocation — tracks geo location state of user's device.
    • useHover — tracks mouse hover state of some element.
    • useIdle — tracks whether user is being inactive.
    • useLocation — tracks page navigation bar location state.
    • useMedia — tracks state of a CSS media query.
    • useMediaDevices — tracks state of connected hardware devices.
    • useMotion — tracks state of device's motion sensor.
    • useNetwork — tracks state of user's internet connection.
    • useOrientation — tracks state of device's screen orientation.
    • useSize — tracks some HTML element's dimensions.
    • useWindowSize — tracks Window dimensions.

  • Side effects

Usage

  • You need to have React 16.7.0-alpha.0 or later installed to use Hooks API.
  • You can import each hook individually import useToggle from 'react-use/lib/useToggle'.

License

Unlicense — public domain.

Description
React Hooks — 👍
Readme Unlicense 146 MiB
Languages
TypeScript 99.6%
JavaScript 0.4%