Vue Storefront is now Alokai! Learn More
Usage

Usage

Alokai integration for Builder.io ships with a framework-agnostic Typescript SDK. You can use it to fetch your data from the Content API.

Before you read

Visit Alokai SDK documentation to learn how to access sdk in both Next and Nuxt.

Fetching content

Our SDK gives you access to all data-fetching methods provided by @builder.io/sdk.

const content = await sdk.builderio.get('page', {
  url: '/',
  locale: 'en'
});
const content = await sdk.builderio.getAll('page', {
  url: '/',
  locale: 'en',
  limit: 1
});

Initializing Live Preview

The Live Preview feature is handled out-of-the-box by Builder's component.