State Management · Junior · Question 59 of 75
What is createAsyncThunk for?
- ✓Correct answer: Wrapping an async request and dispatching
pending/fulfilled/rejectedactions around it - 2Making reducers asynchronous
- 3Creating a WebSocket connection
Explanation
Slices handle those actions in extraReducers to set loading flags and data. For cached server data, RTK Query usually needs less code.