React · Middle · Question 36 of 75
Which actions does createAsyncThunk('users/fetch', ...) generate?
- ✓Correct answer:
pending,fulfilledandrejected - 2
request,successandfailure - 3
start,endanderror
Explanation
The thunk dispatches pending before the request, then fulfilled with the result or rejected with the error. Reducers handle them in extraReducers via builder.addCase(fetchUsers.fulfilled, ...). For caching server data, RTK Query is usually a better fit.