You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the TODOS_RECEIVED case will never execute since this lib only dispatch RECEIVE_PAGE , so I don't why we need to create add TODOS_RECEIVED case in the example?
const todos = (todos = {}, action = {}) {
switch (action.type) {
case 'TODOS_RECEIVED':
let _todos = {}
for (let todo of action.results) {
_todos = {
...todos,
[todo.id]: todo
}
}
return {
...todos,
..._todos
}
default:
return todosPaginator.itemsReducer(todos, action)
}
}
export default combineReducers({
todos,
pagination: todosPaginator.reducers
})
The text was updated successfully, but these errors were encountered:
the TODOS_RECEIVED case will never execute since this lib only dispatch RECEIVE_PAGE , so I don't why we need to create add TODOS_RECEIVED case in the example?
The text was updated successfully, but these errors were encountered: