@zapiu/react
v1.0.0
Published
React 18 and 19 bindings for the Zapiu page SDK, version 1.
Readme
@zapiu/react
React 18 and 19 bindings for the Zapiu page SDK, version 1.
npm install @zapiu/react @zapiu/clientCreate a client once at bootstrap and pass it with the platform-provided page context to ZapiuProvider:
import { createZapiuClient } from '@zapiu/client';
import { ZapiuProvider } from '@zapiu/react';
const client = createZapiuClient();
// page is the page context supplied by your Zapiu host.
const root = <ZapiuProvider client={client} page={page}><App /></ZapiuProvider>;Use useCurrentUser, useRecords, useRecord, or useAction in components that need platform services. Each query returns loading and error state. Ordinary React components do not need SDK imports.
The platform validates identity and permissions server-side. Page context is descriptive and does not grant authorization. These bindings target the page SDK API; they do not provide a Fastify backend runtime.
