blob: b9c94771b1d8d69563f530b513a9c178055d8fa4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
const initialState = {
devices: [],
positions: [],
events: []
};
function rootReducer(state = initialState, action) {
switch (action.type) {
case 'UPDATE_POSITIONS':
return Object.assign({}, {
positions: [...state.positions, ...action.positions]
});
default:
return state;
}
}
export default rootReducer
|