소스 검색

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];
+}