All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.react-utils.useBreakpoints.index.js.map Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
{"version":3,"file":"index.js","names":["useSyncExternalStore","equals","getCurrentSize","subscribe","useBreakpoints","breakpointOverrides","getSnapshot","window","currentSize","isSize"],"sources":["../../../src/react-utils/useBreakpoints/index.js"],"sourcesContent":["import { useSyncExternalStore } from \"react\";\n\nimport { equals } from \"ramda\";\n\nimport { getCurrentSize, subscribe } from \"./utils\";\n\nconst useBreakpoints = breakpointOverrides => {\n  const getSnapshot = () => getCurrentSize(window, breakpointOverrides);\n  const currentSize = useSyncExternalStore(subscribe, getSnapshot);\n\n  return { currentSize, isSize: equals(currentSize) };\n};\n\nexport default useBreakpoints;\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAE5C,SAASC,MAAM,QAAQ,OAAO;AAE9B,SAASC,cAAc,EAAEC,SAAS;AAElC,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,mBAAmB,EAAI;EAC5C,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAA;IAAA,OAASJ,cAAc,CAACK,MAAM,EAAEF,mBAAmB,CAAC;EAAA;EACrE,IAAMG,WAAW,GAAGR,oBAAoB,CAACG,SAAS,EAAEG,WAAW,CAAC;EAEhE,OAAO;IAAEE,WAAW,EAAXA,WAAW;IAAEC,MAAM,EAAER,MAAM,CAACO,WAAW;EAAE,CAAC;AACrD,CAAC;AAED,eAAeJ,cAAc","ignoreList":[]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy