redux toolkit createAsuncThunk thunkApi return types

The rejected type is defined in the third generic argument.

You can find the docs on that here

export const deleteTodos = createAsyncThunk<
DeleteTodoSuccess, 
number, 
{
  rejectValue: DeleteTodoError 
}
>(

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top