aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reducers/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/reducers/index.js')
-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 0000000..b9c9477
--- /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