React · Middle · Question 36 of 75

Which actions does createAsyncThunk('users/fetch', ...) generate?

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.

Further reading

Problem with a question

React · Middle · question 36

Test yourself

Take the React · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz