Explorar o código

Initial skeleton

Kirk Trombley %!s(int64=5) %!d(string=hai) anos
pai
achega
8017df40bc
Modificáronse 1 ficheiros con 16 adicións e 0 borrados
  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];
+}