Skip to main content

useStatus()

function useStatus(): Ref<{
connected: boolean;
connecting: boolean;
dataFlowStatus: {
downloadError: {};
downloading: boolean;
uploadError: {};
uploading: boolean;
};
hasSynced: boolean;
lastSyncedAt: {};
priorityStatusEntries: {
hasSynced: boolean;
lastSyncedAt: {};
priority: number;
}[];
getMessage: string;
isEqual: boolean;
statusForPriority: SyncPriorityStatus;
toJSON: SyncStatusOptions;
}>

Retrieve the current synchronization status of PowerSync.

Returns

Ref<{ connected: boolean; connecting: boolean; dataFlowStatus: { downloadError: {}; downloading: boolean; uploadError: {}; uploading: boolean; }; hasSynced: boolean; lastSyncedAt: {}; priorityStatusEntries: { hasSynced: boolean; lastSyncedAt: {}; priority: number; }[]; getMessage: string; isEqual: boolean; statusForPriority: SyncPriorityStatus; toJSON: SyncStatusOptions; }>

SyncStatus

Example

<script setup>
import { useStatus } from '@powersync/vue';

const status = useStatus();
<script>

Deprecated

Use useStatus instead.