Action Matchers

There exists a set of Redux Toolkit action matching utilities that match the pending, fulfilled, and rejected actions that will be dispatched by this thunk. These allow you to match on Redux actions for that endpoint, such as in createSlice.extraReducers or a custom middleware. Those are implemented as follows:

api.endpoints.x.matchPending // isAllOf(isPending(thunk), matchesEndpoint(endpoint)), api.endpoints.x.matchFulfilled // isAllOf(isFulfilled(thunk), matchesEndpoint(endpoint)), api.endpoints.x.matchRejected // isAllOf(isRejected(thunk), matchesEndpoint(endpoint)),