The full list of hooks in the @intouchg/hooks package can be found below.

  • useCookie - store and retrieve cookies and react to changes
  • useInternetListener - react to changes in internet connectivity
  • useInView - watch an element's position in or out of the view with IntersectionObserver
  • useIsoLayoutEffect - isomorphic useLayoutEffect for Server-Side Rendering
  • useMeasure - watch an element's size and position with ResizeObserver
  • useMediaQuery - watch for matches to a CSS min-width media query
  • useOutsideClickListener - react to clicks outside an element
  • usePrevious - store and access a value from the previous render
  • useScrollLock - toggle locking the browser window to prevent scrolling
  • useWindowSize - watch the window's size
  • useRafMeasure - a useMeasure hook that only renders on requestAnimationFrames
  • useRafState - a useState hook that only renders on requestAnimationFrames
  • useRafWindowSize - a useWindowSize hook that only renders on requestAnimationFrames