public static ImmutableArray<Todo> DeleteTodoReducer(ImmutableArray<Todo> previousState, DeleteTodoAction action) { var todoToDelete = previousState.First(todo => todo.Id == action.TodoId); return previousState.Remove(todoToDelete); }
public static ImmutableArray <Todo> DeleteTodoReducer(ImmutableArray <Todo> previousState, DeleteTodoAction action) { var todoToDelete = previousState.First(todo => todo.Id == action.TodoId); return(previousState.Remove(todoToDelete)); }