Skip to content

Function: onDeviceChange() ​

ts
function onDeviceChange(listener): () => void;

Fires whenever a device is plugged in or pulled out. Returns its own unsubscribe, so a React effect's cleanup is the value it already has.

Parameters ​

ParameterType
listener() => void

Returns ​

() => void

Talkline documentation