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

@storyblok/react

Package Overview
Dependencies
Maintainers
7
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storyblok/react - npm Package Compare versions

Comparing version 2.0.17 to 2.0.18

8

package.json
{
"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 @@

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