useStatus()
function useStatus(): SyncStatus
Custom hook that provides access to the current status of PowerSync.
Returns
SyncStatus
The PowerSync Database status.
The PowerSync Database status.
Examples
import { useStatus } from "@powersync/react";
const Component = () => {
const status = useStatus();
return <div>
status.connected ? 'wifi' : 'wifi-off'
</div>
};
const Component = () => {
const status = usePowerSyncStatus();
return <div>
status.connected ? 'wifi' : 'wifi-off'
</div>
};
Deprecated
Use useStatus instead.
Custom hook that provides access to the current status of PowerSync.