We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 581e171 + dfb0b92 commit 666f182Copy full SHA for 666f182
docs/api/createAsyncThunk.mdx
@@ -513,9 +513,11 @@ const fetchUserById = createAsyncThunk(
513
514
```ts no-transpile
515
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'
516
-import { userAPI } from './userAPI'
+import { userAPI, User } from './userAPI'
517
518
-const fetchUserById = createAsyncThunk(
+const fetchUserById = createAsyncThunk<User, string, {
519
+ state: { users: { loading: string, currentRequestId: string } }
520
+}> (
521
'users/fetchByIdStatus',
522
async (userId: string, { getState, requestId }) => {
523
const { currentRequestId, loading } = getState().users
0 commit comments