@storyblok/react
Advanced tools
Comparing version 2.0.17 to 2.0.18
{ | ||
"name": "@storyblok/react", | ||
"version": "2.0.17", | ||
"version": "2.0.18", | ||
"description": "SDK to integrate Storyblok into your project using React.", | ||
@@ -30,8 +30,8 @@ "main": "./dist/storyblok-react.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.21.3", | ||
"@babel/preset-env": "^7.20.2", | ||
"@babel/core": "^7.21.4", | ||
"@babel/preset-env": "^7.21.4", | ||
"@cypress/react": "^5.12.5", | ||
"@cypress/vite-dev-server": "^2.2.3", | ||
"@tsconfig/recommended": "^1.0.2", | ||
"@types/react": "18.0.31", | ||
"@types/react": "18.2.0", | ||
"@vitejs/plugin-react": "^1.3.2", | ||
@@ -38,0 +38,0 @@ "babel-jest": "^29.5.0", |
@@ -59,3 +59,2 @@ <div align="center"> | ||
Register the plugin on your application and add the [access token](https://www.storyblok.com/docs/api/content-delivery#topics/authentication?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-react) of your Storyblok space. You can also add the `apiPlugin` in case that you want to use the Storyblok API Client: | ||
For Spaces created under `US` region, you should pass the region like `{ apiOptions: { region: 'us' } }`. If your space is under `EU`, no further configuration is required. | ||
@@ -67,7 +66,5 @@ ```js | ||
accessToken: "YOUR_ACCESS_TOKEN", | ||
use: [apiPlugin], | ||
// bridge: false, | ||
apiOptions: { | ||
region: "us", // Pass this key/value if your space was created under US region | ||
}, | ||
use: [apiPlugin], | ||
// apiOptions: {}, | ||
components: { | ||
@@ -88,2 +85,27 @@ page: Page, | ||
#### Region parameter | ||
Possible values: | ||
- `eu` (default): For spaces created in the EU | ||
- `us`: For spaces created in the US | ||
- `cn`: For spaces created in China | ||
Full example for a space created in the US: | ||
```js | ||
import { storyblokInit, apiPlugin } from "@storyblok/react"; | ||
storyblokInit({ | ||
accessToken: "YOUR_ACCESS_TOKEN", | ||
use: [apiPlugin], | ||
apiOptions: { | ||
region: "us", | ||
}, | ||
components: { }, | ||
}); | ||
``` | ||
> Note: For spaces created in the United States or China, the `region` parameter **must** be specified. | ||
### Getting Started | ||
@@ -310,2 +332,7 @@ | ||
## The Storyblok JavaScript SDK Ecosystem | ||
![A visual representation of the Storyblok JavaScript SDK Ecosystem](https://a.storyblok.com/f/88751/2400x1350/be4a4a4180/sdk-ecosystem.png/m/1200x0) | ||
## đ Related Links | ||
@@ -312,0 +339,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
69047
354