2.2.0 • Published 10 months ago

@starlightcms/react-sdk v2.2.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
10 months ago

Starlight React SDK

This is the official Starlight SDK for React applications, which makes integrating Starlight content into your apps a real breeze.

You can read the usage guide and the API reference in its documentation page.

Quick Start

To quickly start using the React SDK, install it into your project:

npm install @starlightcms/react-sdk

Then, import the SDK and configure which Starlight workspace it should request data from:

import Starlight from '@starlightcms/react-sdk'

Starlight.configure({
  workspace: '1234567890'
})

And, finally, start requesting data and rendering content:

import Starlight, { VisualContent } from '@starlightcms/react-sdk'

// Listing all entries from the 'posts' model.
const response = Starlight.posts.entries.list()

// Getting content from the 'hello-world' entry.
const response = Starlight.posts.entries.get('hello-world')

// Rendering visual editor content:
<VisualContent content={response.data.data.content} />

The SDK is capable of requesting a myriad of different content from your workspaces. Check out the documentation to learn more.

JavaScript SDK

If you don't use React, take a look at the Starlight JavaScript SDK. It provides most of React SDK's functionality, and you can use it with vanilla JavaScript or any JS framework.

Issues

If you have any questions or you're facing any issues with the SDK, feel free to open an issue.

2.2.0

10 months ago

1.1.0

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.0.0

1 year ago

0.11.0

1 year ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.3.0

2 years ago

0.3.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.1.1

2 years ago

0.0.1

3 years ago