Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 911 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 911 Bytes

@essex-toolkit/hooks

Provides a set of useful react hooks for common applications

List of available Hooks:

  • useDimensions: getting the dimensions of the given element
  • useSelectionHandler: provides basic selection handling
  • useLongRunning: invokes a long running task, and provides a loading flag
  • useDynamicData: allows for the use of a dynamic data source
  • useEventListener: adds various listeners to the given element and cleans them up when done
  • useMousePosition: gets the current mouse position on the given element
  • useScrollListener: adds a scroll listener to the given element
  • useToggle: hook for a toggleable state
  • useDestroyable: hook for using a destroyable thing, so when the value changes
  • useInterval: creates an interval with the specified delay, and clears it on unmount

License

Licensed under the MIT License.