@shopify/react-network
Advanced tools
Comparing version 3.2.1 to 3.2.2
{ | ||
"name": "@shopify/react-network", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"license": "MIT", | ||
@@ -27,4 +27,4 @@ "description": "A collection of components that allow you to set common HTTP headers from within your React application.", | ||
"dependencies": { | ||
"@shopify/network": "^1.4.1", | ||
"@shopify/react-effect": "^3.2.2", | ||
"@shopify/network": "^1.4.2", | ||
"@shopify/react-effect": "^3.2.3", | ||
"@types/accept-language-parser": "1.5.0", | ||
@@ -35,5 +35,2 @@ "@types/koa": "^2.0.46", | ||
}, | ||
"devDependencies": { | ||
"typescript": "~3.2.1" | ||
}, | ||
"files": [ | ||
@@ -40,0 +37,0 @@ "dist/*", |
@@ -127,3 +127,4 @@ # `@shopify/react-network` | ||
```tsx | ||
import {renderToString} from 'react-dom/server'; | ||
import React from 'react'; | ||
import {render} from '@shopify/react-html/server'; | ||
import {extract} from '@shopify/react-effect/server'; | ||
@@ -137,3 +138,3 @@ import { | ||
export default function render(ctx: Context) { | ||
export default function renderApp(ctx: Context) { | ||
// Accepts an optional headers argument for giving access | ||
@@ -156,3 +157,7 @@ // to request headers. | ||
applyToContext(ctx, networkManager); | ||
ctx.body = renderToString(app); | ||
ctx.body = render( | ||
<NetworkContext.Provider value={networkManager}> | ||
{app} | ||
</NetworkContext.Provider>, | ||
); | ||
} | ||
@@ -159,0 +164,0 @@ ``` |
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
35076
0
168
Updated@shopify/network@^1.4.2
Updated@shopify/react-effect@^3.2.3