Destructuring is a new feature introduced in ES6 which allows you to easily extract values from Objects or Arrays and assign to new values or even assign default values to undefined properties.
Consider the following code.
const name = user.name
const gender = user.gender
const age = user.age
Here we have a user Object with keys for name, gender and age and we want to extract the values of these keys and assign them to their own variables. In this example we are defining new variable names and assigning the value of each of the required properties of the user Object to those variables so that we can work with then separately.
... read the whole story at medium.com.