Skip to content

React: Introduction

kizunasync/react binds an IKizunaSync client to React state. It opens no database and no remote of its own: the client is built with kizunasync and a driver, and this reference documents KizunaSyncProvider plus the seven hooks that read it.

Version#

kizunasync/react 0.2.6-alpha.3 (Alpha). npm package kizunasync, import path kizunasync/react; React 19 optional peer. See Installing.

What this reference covers#

  • Initializing builds the client once and puts it in context, and useQuery turns a local select into rendered rows. Those two pages are the shortest path to a working list.
  • The rest of the surface covers writes with useMutation, the automatic sync loop with useSyncStatus, one attachment ref with useAttachment, the durable rejection journal with useRejections, the durable overwrite journal with useOverwrites, and the client itself with useKizunaSync.
  • Every option the client takes is documented in the JavaScript tree, because this package forwards the instance built there without wrapping it.

What Supabase covers#

ConcernUse
Sign-in, sessions, and JWT refreshsignInWithPassword and Auth sessions
Row Level Security policiesWrite a policy for each operation
Realtime channels behind the wake-up doorbellsubscribe
Storage buckets outside the attachment pathupload

Kizuna adds one thing to each row above. The session's access token rides every pull and push. The server judges the policies when a queued write reaches it, not when the component renders. A Realtime message wakes a sync run instead of carrying data. Attachment bytes move through the transfer port that Media and attachments describes.

Found a problem? Edit this page on GitHub