我有一个接收id的thunk,并在商店的特定区域上执行一些逻辑。然后我想在商店的一个完全不同的区域上做一些逻辑。要做到这一点,我不能触发一个常规的操作,因为我将无法访问商店:我需要另一个thunk。'(dispatch: any, getState: any) => any' is not assignable to
parameter of type 'AnyAction'.Property 'type' is missing in <
这是我得到的错误,当我单击按钮并调用我的voteHandler函数时,它就会发生。Error: Actions must be plain objects.这就是函数,错误消息突出显示了我调用setNotification函数的那一行。};我一直在做这个实验,如果我只对setNotification使用这个函数,通知消息就会出现,因此看起来可能是我调用setTimeout调用的方式有问题?: content};
我还在学习<
有没有办法从使用redux-mock-store创建的存储中正确地分派一个Thunk?现在,我被迫使用任何类型断言因为dispatch期望提供简单的操作Argument of type '(dispatchIRootState, undefined,
AnyAction>, getState: () => IRootState) => void' is not assignable to param