I could use some help with the “Expense Tracker” lesson, I don’t think I’ve set up the “createSlice” function call for the “budgetSlice” correctly:
const budgetsSlice = createSlice({
name : “budgets”,
initialState: initialState,
reducers: {
editBudget : (state, action) => {
console.log(“action.payload” + action);
state.budgets.find(budget => budget.category === action.payload.category).amount = action.payload.amount;
}
}
});