In legacy code for an Electron + Vue.js + ES7 project, there is Javascript using square brackets around the names of object elements, and I can't find the source of this syntax. Does this look familiar to you? Is it super-recent Ecmascript? Does this suggest a transpiler in the build that I'm not aware of?
const state = {
[SUBMISSIONS]: [],
[LAST_OPENED_ROW_ID]: -1
}
const mutations = {
[SUBMISSION] (s, data) {
return Object.assign(s, { [SUBMISSION]: data })
}
}