但我不明白right如何与异步调用一起工作。早些时候我使用了 import * as actionQR from "..actionQR: bindActionCreators(actionQR, dispatch),} 然后调用我的this.props.actionQR.myFunc(),但是我应该如何处理useDispatch()呢?/actions/qr";useDispatch(foo()); then my foo() dont
我似乎不能接收来自createAsyncThunk函数的Promise来自Redux-toolkit我对Typescript还很陌生,我在努力弄清楚为什么它会给我Property 'then' does not exist on type 'AsyncThunkAction<Student, number, {}>'错误,即使如果我删除键入就会返回promise。这是我的createAsyncThunk f-n export const getStudentByIdRequest = createAsyncThunk<Student, num