Using RTK query to fetching data inside of a thunk #1752
-
I have performed queries and mutations inside thunks in the past when absolutely necessary. I have never needed to access the result of a query in the past and consume it inside of a component. I have to do this to perform submission validations with react-final-form so I can't use hooks. registration.effects.ts
Validation function for react-final-form
I am getting this error Am I overlooking something obvious? I looked at examples: https://redux-toolkit.js.org/rtk-query/usage/usage-without-react-hooks and https://redux-toolkit.js.org/api/createAsyncThunk and still can't figure out what I am doing wrong :( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Also, make sure to use the 1.7 beta, that is much more consistent in these situations |
Beta Was this translation helpful? Give feedback.
Dispatch<any>
should beThunkDispatch<AnyAction>
.Also, make sure to use the 1.7 beta, that is much more consistent in these situations