aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reducers
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/reducers')
-rw-r--r--modern/src/reducers/index.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/modern/src/reducers/index.js b/modern/src/reducers/index.js
new file mode 100644
index 00000000..b9c94771
--- /dev/null
+++ b/modern/src/reducers/index.js
@@ -0,0 +1,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