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