Possibly it’s not actual and the question is outdated, but there is thunkAPI
as second parameter in payload creator of createAsyncThunk
, so it can be used like so
export const updateData = createAsyncThunk('data/update', async (params, {dispatch}) => {
const result = await sdkClient.update({ params })
dispatch(getData())
return result
})