You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/createAsyncThunk.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,7 +234,7 @@ const onClick = () => {
234
234
235
235
The thunks generated by `createAsyncThunk`**will always return a resolved promise** with either the `fulfilled` action object or `rejected` action object inside, as appropriate.
236
236
237
-
The calling logic may wish to treat these actions as if they were the original promise contents. Redux Toolkit exports an `unwrapResult` function that can be used to extract the `payload` or `error`from the action, and return or throw the result appropriately:
237
+
The calling logic may wish to treat these actions as if they were the original promise contents. Redux Toolkit exports an `unwrapResult` function that can be used to extract the `payload`of a `fulfilled` action or to throw either the `error`or, if available, `payload` created by `rejectWithValue` from a `rejected` action:
0 commit comments