请注意,我在redux商店中遇到了一些我不理解的行为。 尽管我的store.dispatch在从js类调用时调用了reducer,但它并没有触发更改。other store enhancers if any ); store.subscribe=> console.log("An action has ben fired here &
我不知道为什么下面的方法可以工作,尽管我知道为什么它效率不高:function applyMiddlewareByMonkeypatching(store, middlewares) { store.dispatch = middleware(store)}
// We could use it to难道您不会在forEach循环的每次迭代中都覆盖store.dispatch()