import { useRecoilValue } from 'recoil';
import { breakpointName } from "../../../atoms/breakpoint/index.js";

/**
 * Get the name of the breakpoint that the current measurement fits into.
 */
const useBreakpointName = function useBreakpointName(key = 'window') {
  return useRecoilValue(breakpointName(key));
};
export default useBreakpointName;