How to understand the object deconstruction assignment of ES6?

ES6 Code

const a = {
    action:({commit}) => {
        commit("action")
    }
}

question: how to understand {commit} here?

Oct.19,2021

 

"ES6 allows to extract values from arrays and objects and assign values to variables according to a certain pattern, which is called deconstruction."
this is what you mean by commit .

but, what you have here has nothing to do with structure assignment. Your commit is a parameter passing object in an arrow function.

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-1eb23aa-4818f.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-1eb23aa-4818f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?