Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/react-hooks

Package Overview
Dependencies
Maintainers
13
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 1.9.0 to 1.9.1

6

CHANGELOG.md

@@ -8,4 +8,8 @@ # Changelog

<!-- ## [Unreleased] -->
## [Unreleased]
### Fixed
- Add missing `useMediaLayout` export ([#1408](https://github.com/Shopify/quilt/pull/1408))
## [1.9.0] - 2020-04-23

@@ -12,0 +16,0 @@

2

dist/src/hooks/index.d.ts
export { useDebouncedValue } from './debounced';
export { useInterval } from './interval';
export { useLazyRef } from './lazy-ref';
export { useMedia } from './media';
export { useMedia, useMediaLayout } from './media';
export { useMountedRef } from './mounted-ref';

@@ -6,0 +6,0 @@ export { useOnValueChange } from './on-value-change';

@@ -11,2 +11,3 @@ "use strict";

exports.useMedia = media_1.useMedia;
exports.useMediaLayout = media_1.useMediaLayout;
var mounted_ref_1 = require("./mounted-ref");

@@ -13,0 +14,0 @@ exports.useMountedRef = mounted_ref_1.useMountedRef;

{
"name": "@shopify/react-hooks",
"version": "1.9.0",
"version": "1.9.1",
"license": "MIT",

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

@@ -117,6 +117,8 @@ # `@shopify/react-hooks`

### `useMedia()`
### `useMedia()` & `useMediaLayout()`
This hook will listen to a [MediaQueryList](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList) created via [matchMedia](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia) and return true or false if it matches the media query string.
`useMediaLayout` is similar to `useMedia` but it uses `useLayoutEffect` internally to re-render synchronously.
```tsx

@@ -123,0 +125,0 @@ function MyComponent() {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc