You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/4.sdk/2.getting-started/1.index.md
+23-4
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ If you're setting your Alokai application from scratch, you'll need to configure
6
6
In the examples below, we assume that you have an Alokai app with the Unified Data Model. However, the approach for non-unified Alokai applications is similar.
7
7
:::
8
8
9
-
There are various ways to configure the SDK, depending on your chosen framework. For Next.js and Nuxt, you can use the `@vue-storefront/next` and `@vue-storefront/nuxt` packages respectively.
9
+
There are various ways to configure the SDK, depending on your chosen framework. For Next.js and Nuxt, you can use the `@vue-storefront/next` and `@vue-storefront/nuxt` packages respectively.
10
10
These packages also provide tools for handling the global state management.
11
11
12
12
If you're looking for framework agnostic experience, you can use the `@vue-storefront/sdk` package.
@@ -174,15 +174,34 @@ To use it, you'll need to create a new file in your application, for example `sd
This is also a place where you can import hooks for handling the state management. You can read more about the state management in the [State Management](/sdk/getting-started/state-management) page.
193
+
The `SfContract` interface is used to define the contract between the SDK and the state management. It contains the types for:
184
194
185
-
Once you have created the Alokai context, you can create client-side SDK instance and register it in your application.
195
+
- cart (`SfCart` type)
196
+
- customer (`SfCurrency` type)
197
+
- currency (`SfCurrency` type)
198
+
- locale (`SfLocale` type)
199
+
200
+
This is needed to ensure that the state management is aware of the types that you have within the middleware, as those types can be changed within the middleware.
201
+
202
+
You can read more about the state management in the [State Management](/sdk/getting-started/state-management) page.
203
+
204
+
Once you have created the Alokai context, you can create client-side SDK instance and register it in your application.
0 commit comments