React
2
Вклад в тег
const newArrayId = this.state.countId;
newArrayId.map((element) => { element.quantity + 1 });
this.setState({countId: newArrayId});
overflow-x: hidden;
case EDIT_TODO: {
const index = state.todos.findIndex((todo) => todo.id == action.payload.id);
const newTodos = [...state.todos];
newTodos[index] = action.payload;
return { ...state, todos: newTodos };
}