I'm following along a React tutorial, And I come across this syntax:
const itemsFromBackend = [
{ id: uuid(), content: "First task" },
{ id: uuid(), content: "Second task" },
{ id: uuid(), content: "Third task" },
{ id: uuid(), content: "Fourth task" },
{ id: uuid(), content: "Fifth task" }
];
const columnsFromBackend = {
[uuid()]: {
name: "Todo",
items: itemsFromBackend
}
};
What does it means this [uuid()]:{ }
array-Object syntax in relation with the first array of tasks itemsFromBackend? I saw something similar while handling changes in React forms, but not sure if it's the same thing. Thanks for the help!