I run into this piece of code while learning Redux. I am sure that the funtion returning an object and the object has type
, id
, text
properties. I know that type
equal to ADD_TODO
and id
equal to nextTodoId++
. But I have no idea about the last property. Does it mean that text: text
?
export const addTodo = text => ({
type: 'ADD_TODO',
id: nextTodoId++,
text
})