What is the difference between calling object Obj, directly in es6 and {.Obj}.

see such a way to write, such as introducing an object Obj, and then assigning gConfig to that object. The code is as follows

// Setting.js
export default {
    type:4,
    city:3,
    doman:".baidu.com"
    ip:"10.40.3.20"
}

// Config.js
import Settings from "./Setting"
const myConfig = {
    gConfig:{...Settings}  //
}
What is the difference between

gConfig: {.Settings} and gConfig:Settings? Ask for advice ~

Mar.23,2021

first, myConfig.gConfig = Settings is false
second, myConfig.gConfig = Settings is true

the first one is generally used to avoid affecting Settings

when making changes to myConfig.gConfig .

suppose setting= {key:1};
the first gConfig= {key:1}
the second gConfig= {setting: {key:1}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e53f-2c3fa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e53f-2c3fa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?