@xemahq/realtime-client
v0.1.2
Published
<p align="center"> <svg width="680" height="120" viewBox="0 0 680 120" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="@xemahq/realtime-client"> <rect width="680" height="120" rx="14" fill="#0B1020"/> <g transform="translate(28,3
Downloads
194
Readme
@xemahq/realtime-client
React hooks for the unified realtime event stream
Overview
The frontend SDK for the unified realtime stream. It provides a React context provider and hooks that manage an SSE connection, cross-tab leader election to dedup connections, multi-scope cursor tracking, and descriptor-driven cache invalidation. It pairs with the server-side realtime SSE edge so a client subscribes to event scopes and reacts to incoming frames.
When to use it
- Use it in a React app that needs live updates from the realtime event stream.
Installation
pnpm add @xemahq/realtime-clientUsage
import { RealtimeProvider } from '@xemahq/realtime-client';
export function App({ children }: { children: React.ReactNode }) {
return <RealtimeProvider>{children}</RealtimeProvider>;
}Peer requirements
react^18.3.1@tanstack/react-query>=5
License
Apache-2.0 © Xema — xema.dev
