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