展望redux todomvc,爲什麼以下的{}
之間沒有按鍵?例如在下面的text
和id
之前沒有鑰匙?有點困惑。javascript:爲什麼在javascript對象中沒有按鍵
import * as types from '../constants/ActionTypes'
export const addTodo = text => ({ type: types.ADD_TODO, text })
export const deleteTodo = id => ({ type: types.DELETE_TODO, id })
export const editTodo = (id, text) => ({ type: types.EDIT_TODO, id, text })
export const completeTodo = id => ({ type: types.COMPLETE_TODO, id })
export const completeAll =() => ({ type: types.COMPLETE_ALL })
export const clearCompleted =() => ({ type: types.CLEAR_COMPLETED })
歡迎任何評論。謝謝。
UPDATE
謝謝你的回答和評論。我發現我的問題有點愚蠢。目前,我正在學習反應和樂趣。我不熟悉es2015。有時,我無法區分2015es新語法和redux語法。謝謝。
我不知道你在問什麼。 – Neal
現在什麼關鍵? – Neal
他失去了他的鑰匙。 –