Skip to main content

usePowerSyncStatus()

function usePowerSyncStatus(): SyncStatus

Returns

SyncStatus

The PowerSync Database status.

Deprecated

Use useStatus instead.

Custom hook that provides access to the current status of PowerSync.

Example

const Component = () => {
const status = usePowerSyncStatus();

return <div>
status.connected ? 'wifi' : 'wifi-off'
</div>
};