@shopify/react-network
Advanced tools
Comparing version 3.5.2-async-text-cleanup-beta.2 to 3.5.2
@@ -14,3 +14,3 @@ # Changelog | ||
- Fixes bug where empty cookies are still being set | ||
- Fixes bug where empty cookies are still being set [#1517](https://github.com/Shopify/quilt/pull/1517) | ||
@@ -21,3 +21,3 @@ ## [3.5.0] - 2020-06-16 | ||
- Do not set `set-cookie` headers for incoming request cookies | ||
- Do not set `set-cookie` headers for incoming request cookies [#1515](https://github.com/Shopify/quilt/pull/1515) | ||
@@ -24,0 +24,0 @@ ## [3.4.0] - 2020-06-10 |
{ | ||
"name": "@shopify/react-network", | ||
"version": "3.5.2-async-text-cleanup-beta.2", | ||
"version": "3.5.2", | ||
"license": "MIT", | ||
@@ -27,6 +27,6 @@ "description": "A collection of components that allow you to set common HTTP headers from within your React application", | ||
"dependencies": { | ||
"@shopify/network": "^1.4.7", | ||
"@shopify/network": "^1.5.0", | ||
"@shopify/react-effect": "^3.2.12", | ||
"@shopify/react-hooks": "^1.10.1", | ||
"@shopify/react-universal-provider": "^1.1.19-async-text-cleanup-beta.2", | ||
"@shopify/react-universal-provider": "^1.1.18", | ||
"@types/accept-language-parser": "1.5.0", | ||
@@ -33,0 +33,0 @@ "@types/cookie": "^0.3.3", |
@@ -91,4 +91,6 @@ # `@shopify/react-network` | ||
This library allows you to read from request headers, and set response headers. To set a header, call the `useHeader()` hook, which accepts the name of a header and the desired value. `useRequestHeader()`, on the other hand, gives you access to a specified request header (see `NetworkUniversalProvider` below for usage on client-side renders). | ||
This library allows you to read from request headers, and set response headers. To set a header, call the `useHeader()` hook, which accepts the name of a header and the desired value. `useRequestHeader()`, on the other hand, gives you access to a specified request header. | ||
**Note:** calling `useRequestHeader` on client-side renders will give you `undefined`, since we only have access to the request context on the server. To remedy this, wrap your app in a `NetworkUniversalProvider` (see below for more details). | ||
```tsx | ||
@@ -108,2 +110,4 @@ import {useHeader, useRequestHeader} from '@shopify/react-network'; | ||
**Note:** `useAcceptLanguage` calls `useRequestHeader`, so the constraints on client-side renders apply here too. Wrap your app in a `NetworkUniversalProvider` and pass in `[Header.AcceptLanguage]` to the `headers` prop in order to call `useAcceptLanguage` on subsequent client-side renders. | ||
```tsx | ||
@@ -110,0 +114,0 @@ import {useAcceptLanguage} from '@shopify/react-network'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
59347
0
229