https://redux.js.org/introduction/getting-started
题目:根据官网上的例子来一个极简实现。只需要实现相同的输出即可
export const createStore = (reducer) => {let state = undefined;let subscribeFn = () => {};const subscribe = (fn) => {subscribeFn = fn;};const dispatch = (action) => {state = reducer(state, action);subscribeFn();};const getState = () => state;return {subscribe,dispatch,getState,};};
