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
Member | Type |
---|---|
connected | boolean |
dataFlowStatus | { |
downloading : boolean ; | |
uploading : boolean ; | |
} | |
dataFlowStatus.downloading | boolean |
dataFlowStatus.uploading | boolean |
hasSynced | boolean |
lastSyncedAt | {} |
getMessage | string |
isEqual | boolean |
toJSON | SyncStatusOptions |
Example
<script setup>
import { useStatus } from '@powersync/vue';
const status = useStatus();
<script>