浏览代码

Initial skeleton

Kirk Trombley 5 年之前
父节点
当前提交
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];
+}