Kirk Trombley 5 жил өмнө
parent
commit
8017df40bc
1 өөрчлөгдсөн 16 нэмэгдсэн , 0 устгасан
  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];
+}