🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@shopify/react-hooks

Package Overview
Dependencies
Maintainers
0
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/react-hooks - npm Package Compare versions

Comparing version

to
4.0.0

6

build/cjs/hooks/media.js

@@ -8,4 +8,6 @@ 'use strict';

function createUseMediaFactory(useEffectHook) {
return query => {
const [match, setMatch] = React.useState(false);
return (query, {
initialValue
}) => {
const [match, setMatch] = React.useState(() => initialValue === undefined ? window.matchMedia(query).matches : Boolean(initialValue));
useEffectHook(() => {

@@ -12,0 +14,0 @@ if (!window || !window.matchMedia) {

@@ -1,3 +0,7 @@

export declare const useMedia: (query: string) => boolean;
export declare const useMediaLayout: (query: string) => boolean;
export declare const useMedia: (query: string, { initialValue }: {
initialValue?: boolean;
}) => boolean;
export declare const useMediaLayout: (query: string, { initialValue }: {
initialValue?: boolean;
}) => boolean;
//# sourceMappingURL=media.d.ts.map
{
"name": "@shopify/react-hooks",
"version": "3.2.0",
"version": "4.0.0",
"license": "MIT",

@@ -48,5 +48,5 @@ "description": "A collection of primitive React hooks",

"devDependencies": {
"@shopify/jest-dom-mocks": "^5.1.0",
"@shopify/react-testing": "^5.3.0"
"@shopify/jest-dom-mocks": "^5.2.0",
"@shopify/react-testing": "^5.4.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet