It feels like {} is an object, but the format inside is not quite right. Shouldn’t it be { auth: true }, and then assign a value meta value? Don’t know what it means
//对象的解构也可以指定默认值。
var {x = 3} = {};
x // 3
var {x, y = 5} = {x: 1};
x // 1
y // 5
var {x:y = 3} = {};
y // 3
var {x:y = 3} = {x: 5};
y // 5
var { message: msg = 'Something went wrong' } = {};
msg // "Something went wrong"
For this kind of problem, I hope you can check it later through the babeljs.io official online compiler
{ auth = true } It is equivalent to assigning a default value to auth. If the value of the auth attribute in the meta object is undefined, the default value true will be assigned to the variable auth
Here is object destructuring in
ES6
For this kind of problem, I hope you can check it later through the babeljs.io official online compiler
Destructuring assignment.
New features in es6.
This outside is destructuring assignment
This is the default value
If written in es5, it is like this:
Destructuring assignment in ES6
{ auth = true }
It is equivalent to assigning a default value to auth. If the value of the auth attribute in the meta object is undefined, the default value true will be assigned to the variable auth