Skip to main content

Client

The Client is automatically created by the Zerve CLI. But you can also install and use it directly.

Warning: This API may change in the coming months while Zerve is in alpha. To avoid breaking changes, use the CLI workflow directly, and update @zerve/cli and @zerve/client at the same time.

Installation

yarn add @zerve/client

This library depends on React Query as a required peer dependency. This means you need to install it yourself:

yarn add react-query

Usage

import { createZStoreClient } from "@zerve/client/StoreClient";

export const zClient = createZStoreClient(
"https://", // protocol
"alpha.zerve.app", // host
".z/store/my-user-or-organization/my-store-name", // path
);