text: import { useRef, useState, useEffect } from 'react';
  export function useHover() {
      var _a = useState(false), value = _a[0], setValue = _a[1];
      var ref = useRef(null);
      useEffect(function () {
          var node = ref.current;
          if (node) {
              var handleMouseOver_1 = function () { return setValue(true); };
              var handleMouseOut_1 = function () { return setValue(false); };
              node.addEventListener('mouseover', handleMouseOver_1);
              node.addEventListener('mouseout', handleMouseOut_1);
              return function () {
                  node.removeEventListener('mouseover', handleMouseOver_1);
                  node.removeEventListener('mouseout', handleMouseOut_1);
              };
          }
          // eslint-disable-next-line react-hooks/exhaustive-deps
      }, [ref.current]); // Recall only if ref changes
      return [ref, value];
  }
  