コンテンツにスキップ

Interface: SyncStatus

このコンテンツはまだ日本語訳がありません。

Defined in: react/src/use-sync-status.ts:12

Snapshot of the client’s sync state, polled at refreshIntervalMs. All fields update reactively so consumers can render “offline” / “N unsaved changes” / “last synced 5s ago” without wiring their own polling.

readonly online: boolean

Defined in: react/src/use-sync-status.ts:17

true while the browser is online. Follows navigator.onLine via online / offline events. Read directly on first render.


readonly outboxDepth: number

Defined in: react/src/use-sync-status.ts:23

The number of un-confirmed mutations in the outbox — writes that happened locally but haven’t been acknowledged by the server. 0 means everything you’ve done is durable on the server.


readonly lastError: SyncClientError | null

Defined in: react/src/use-sync-status.ts:29

Most recent SyncClientError observed since the hook mounted. null when there’s been no error, or after a successful push / pull has cleared the transient network state.


readonly syncing: boolean

Defined in: react/src/use-sync-status.ts:34

true while the client believes it’s mid-sync (a poll or manual push/pull is in flight). Useful for a subtle spinner.