Skip to content

Commit

Permalink
refactor(tasks): rename reducer
Browse files Browse the repository at this point in the history
this is more standard
  • Loading branch information
Daniel Wu committed Nov 3, 2017
1 parent c8b2fdb commit b051acd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/reducers/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { combineReducers } from 'redux'

import taskReducer from './taskReducer'
import tasks from './tasks'

const combined = combineReducers({
tasks: taskReducer
tasks: tasks
});

export default combined;
4 changes: 2 additions & 2 deletions client/reducers/taskReducer.js → client/reducers/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const insert = (array, index, item) => {
];
}

const taskReducer = (state = [], action) => {
const tasks = (state = [], action) => {
switch (action.type) {
case 'CLOSE': {
const i = state.findIndex((task) => task.id === action.id);
Expand Down Expand Up @@ -66,4 +66,4 @@ const taskReducer = (state = [], action) => {
}
}

export default taskReducer;
export default tasks;

0 comments on commit b051acd

Please sign in to comment.