Skip to main content

useStatus()

function useStatus(): Ref<{
connected: boolean;
dataFlowStatus: {
downloading: boolean;
uploading: boolean;
};
hasSynced: boolean;
lastSyncedAt: {};
getMessage: string;
isEqual: boolean;
toJSON: SyncStatusOptions;
}>

Retrieve the current synchronization status of PowerSync.

Returns

Ref<{ connected: boolean; dataFlowStatus: { downloading: boolean; uploading: boolean; }; hasSynced: boolean; lastSyncedAt: {}; getMessage: string; isEqual: boolean; toJSON: SyncStatusOptions; }>

SyncStatus

MemberType
connectedboolean
dataFlowStatus{
downloading: boolean;
uploading: boolean;
}
dataFlowStatus.downloadingboolean
dataFlowStatus.uploadingboolean
hasSyncedboolean
lastSyncedAt{}
getMessagestring
isEqualboolean
toJSONSyncStatusOptions

Example

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

const status = useStatus();
<script>