I want to make a DeleteTransaction
case and remove an item from the state using filter
.
My current code is below:
const TransactionReducer = ((state, action) => {
switch(action.type){
case "AddTransactions": {
return [action.payload, ...state]
}
default:
return state;
}
})
export default TransactionReducer;