american-ninja-warrior
american-ninja-warrior

Reputation: 8185

What this kind of syntax called?

Where's the documentation for this syntax? It's a deviation from the classic js.

const { history, getListing, params, useInitialValues } = this.props;

const { bookingDates, ...bookingData } = values;

Upvotes: 2

Views: 46

Answers (2)

Sushanth --
Sushanth --

Reputation: 55750

This is the syntax for destructuring assignment. It is an ES6 feature.

Upvotes: 1

will92
will92

Reputation: 1044

It is called destructuring, checkout Destructuring assignment

Upvotes: 3

Related Questions