> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use-Object-Destructuring

#### Sourcery rule id: `use-object-destructuring`

#### Description

Prefer object destructuring when accessing and using properties.


#### Before

```javascript
const firstName = user.firstName;
```

#### After

```javascript
const {firstName} = user;
```



#### Explanation

Object destructuring can often remove an unnecessary temporary reference, as well as making your code more succinct.

From the [Airbnb Javascript Style Guide](https://airbnb.io/javascript/#destructuring--object)
