---
name: "onDeviceRemoved"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "2.0.7" }
  - { name: "@ray-js/ray", version: "0.6.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## onDeviceRemoved

> [VERSION] DeviceKit >= 2.0.7 | @ray-js/ray >= 0.6.23

> [PLATFORM] iOS, Android

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

### Description

Device removal event

### Parameters

`(listener: Function)`

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

### Referenced Types

##### `interface` OnDeviceRemovedBody

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `deviceId` | `string` | `2.0.7` | Device ID |


### Examples

#### Basic usage

```tsx
import { device } from '@ray-js/ray'

const { onDeviceRemoved } = device;

onDeviceRemoved((res) => {
  console.log('onDeviceRemoved', res);
});
```
