Am I missing something new with object literals or is this an error:
window.state.notes[id] = {
id,
content: ''
}; window.state.notes[id] = {
id,
content: ''
}; id,
..it's an "object literal property value shorthand", equivalent to: id: id, const id = getId();
let obj = {id, otherProp: 'something'};
vs let obj = {id: getId(), otherProp: 'something'};
?