2
這三個點究竟意味着什麼,以及爲什麼我需要它們?角度@NGRX中三個點的含義
export function leadReducer(state: Lead[]= [], action: Action {
switch(action.type){
case ADD_LEAD:
return [...state, action.payload];
case REMOVE_LEAD:
return state.filter(lead => lead.id !== action.payload.id)
}
}
這是es7的原因它在Object not array上工作。 – alexKhymenko
@alexKhymenko感謝您的通知:) – Wernerson