Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
todo-list.reducers.ts
export const todoListReducers = createReducer(
todoListInitState,
on(TodoListActions.getTodoListRequest, state => {
return {
...state,
isLoading: true,
};
}),
on(TodoListActions.getTodoListResponse, (state, action) => {
return {
...state,
todos: action.todoList,
isLoading: false,
};
}),
on(TodoListActions.getTodoListFailed, (state, action) => {
return todoItemsLoadFailed(state, action);
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.