但是,一旦我将函数置于redux状态,然后从那里调用它,它就不再工作了。以下是我所做的(非常简化)。const initialState = {testFunc: testFunc};...// somewhereHere I'm using redux-thunk to access redux state
function te
我在使用typescript和redux-thunk操作时遇到了一些麻烦。基本上,我的组件大量使用react-redux connect来绑定动作创建器,问题是,当我在组件中为这个redux动作创建接口时,我必须重新声明函数定义,因为它在connect调用中丢失了。string) => Promise<any>; // <- this is what I'm trying to get rid of, basical