State Management · Middle · Question 13 of 75
Which actions does createAsyncThunk('users/fetch', fn) dispatch?
- ✓Correct answer:
users/fetch/pending, thenusers/fetch/fulfilledorusers/fetch/rejected - 2
users/fetch/startandusers/fetch/end - 3Only
users/fetchwith the result inpayload
Explanation
Reducers handle them in extraReducers via builder.addCase(fetchUsers.fulfilled, ...) to set loading flags, data and errors. For cached server data RTK Query removes most of this code.