State Management · Middle · Question 13 of 75

Which actions does createAsyncThunk('users/fetch', fn) dispatch?

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.

Further reading

Problem with a question

State Management · Middle · question 13

Test yourself

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

Take this quiz