You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adds a case reducer to handle a single exact action type.
33
60
* @remarks
34
-
* All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`.
61
+
* All calls to `builder.addCase` must come before any calls to `builder.addAsyncThunk`, `builder.addMatcher` or `builder.addDefaultCase`.
35
62
* @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type.
36
63
* @param reducer - The actual case reducer function.
* Adds case reducers to handle actions based on a `AsyncThunk` action creator.
72
+
* @remarks
73
+
* All calls to `builder.addAsyncThunk` must come before after any calls to `builder.addCase` and before any calls to `builder.addMatcher` or `builder.addDefaultCase`.
74
+
* @param asyncThunk - The async thunk action creator itself.
75
+
* @param reducers - A mapping from each of the `AsyncThunk` action types to the case reducer that should handle those actions.
* Allows you to match your incoming actions against your own filter function instead of only the `action.type` property.
45
88
* @remarks
46
89
* If multiple matcher reducers match, all of them will be executed in the order
47
90
* they were defined in - even if a case reducer already matched.
48
-
* All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and before any calls to `builder.addDefaultCase`.
91
+
* All calls to `builder.addMatcher` must come after any calls to `builder.addCase` and `builder.addAsyncThunk` and before any calls to `builder.addDefaultCase`.
49
92
* @param matcher - A matcher function. In TypeScript, this should be a [type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates)
50
93
* function
51
94
* @param reducer - The actual case reducer function.
0 commit comments