diff exp reducer

This commit is contained in:
Colin Megill
2017-12-29 00:16:04 -08:00
parent b22d5bc3e5
commit 8f590e5167
2 changed files with 40 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
const Differential = (state = {
diffExp: null,
loading: null,
error: null,
celllist1: null,
celllist2: null,
}, action) => {
switch (action.type) {
case "request differential expression started":
return Object.assign({}, state, {
loading: true,
error: null
});
case "request differential expression success":
return Object.assign({}, state, {
error: null,
loading: false,
diffExp: action.data,
});
case "request differential expression error":
return Object.assign({}, state, {
loading: false,
error: action.data
});
case "store current cell selection as differential set 1":
return Object.assign({}, state, {
celllist1: action.data
});
case "store current cell selection as differential set 2":
return Object.assign({}, state, {
celllist2: action.data
});
default:
return state;
}
};
export default Differential;
+2
View File
@@ -9,12 +9,14 @@ import initialize from "./initialize";
import cells from "./cells";
import expression from "./expression";
import controls from "./controls";
import differential from "./differential";
const Reducer = combineReducers({
initialize,
cells,
expression,
controls,
differential,
})
let store = createStore(