---
name: "offNetworkStatusChange"
mode: "kit"
versionRequirements:
  - { name: "BaseKit", version: "2.0.1" }
  - { name: "@ray-js/ray", version: "0.3.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## offNetworkStatusChange

> [VERSION] BaseKit >= 2.0.1 | @ray-js/ray >= 0.3.23

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Stop listening for network status changes

### Parameters

`(listener: Function)`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: Object) => void` | Yes | - |  |

##### offNetworkStatusChange.listener(params) properties

| Property | Type | Required | Default | Since | Description |
| --- | --- | --- | --- | --- | --- |
| `isConnected` | `boolean` | Yes | - | `2.0.1` | Whether there is currently a network connection |
| `networkType` | `string` | Yes | - | `2.0.1` | Network type |


### Examples

#### Demo

```tsx
import { onNetworkStatusChange, offNetworkStatusChange } from '@ray-js/ray'

// Unsubscribe from network status changes: register with a named callback; after switching networks triggers once, remove the listener with the same callback
const handler = e => console.log("Network changed:", e.isConnected, e.networkType);
onNetworkStatusChange(handler);
await new Promise(resolve => setTimeout(resolve, 8000));
offNetworkStatusChange(handler);
```
