<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [DeviceMutations](./x-components.devicemutations.md) &gt; [setName](./x-components.devicemutations.setname.md)

## DeviceMutations.setName() method

Sets the [DeviceState.name](./x-components.devicestate.name.md) of the module.

**Signature:**

```typescript
setName(device: string | null): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  device | string \| null | The new device state to set. |

**Returns:**

void

