Kirk Trombley 5 anni fa
parent
commit
8017df40bc
1 ha cambiato i file con 16 aggiunte e 0 eliminazioni
  1. 16 0
      client/src/store.js

+ 16 - 0
client/src/store.js

@@ -0,0 +1,16 @@
+export const createStore = (initial, actions = {}) => {
+  const store = {};
+  const hooks = {};
+
+  const mergeState = newState => {
+    // TODO
+  }
+
+  mergeState(initial);
+
+  const dispatch = {}; // TODO
+
+  const selector = {}; // TODO
+
+  return [hooks, dispatch, selector];
+}