Skip to content

features/network ​

useOnline() ​

ts
function useOnline(): boolean;

Hook that returns the current network connectivity state and updates when it changes.

Returns ​

boolean

true if the device is online, false otherwise


getOnline() ​

ts
function getOnline(): boolean;

Gets the current network connectivity state.

Returns ​

boolean

true if the device is online, false otherwise


onOnlineChanged ​

ts
const onOnlineChanged: NativeUpdatedValue<boolean>;

Subscribes to network connectivity changes.

Param ​

Called when network state changes

Returns ​

Cleanup function to unsubscribe