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
`metaCreator` is an optional function that creates metadata for the payload. It receives the same arguments as the payload creator, but its result becomes the meta field of the resulting action. If `metaCreator` is undefined or not a function, the meta field is omitted.
Returns an object mapping action types to action creators. The keys of this object are camel-cased from the keys in `actionsMap` and the string literals of `identityActions`; the values are the action creators.
98
+
Returns an object mapping action types to action creators. The keys of this object are camel-cased from the keys in `actionMap` and the string literals of `identityActions`; the values are the action creators.
99
99
100
-
`actionsMap` is an optional object with action types as keys, and whose values **must** be either
100
+
`actionMap` is an optional object and a recursive data structure, with action types as keys, and whose values **must** be either
101
101
102
102
- a function, which is the payload creator for that action
103
103
- an array with `payload` and `meta` functions in that order, as in [`createAction`](#createactiontype-payloadcreator--identity-metacreator)
104
104
-`meta` is **required** in this case (otherwise use the function form above)
105
+
- an `actionMap`
105
106
106
107
`identityActions` is an optional list of positional string arguments that are action type strings; these action types will use the identity payload creator.
If `actionMap` has a recursive structure, its leaves are used as payload and meta creators, and the action type for each leaf is the combined path to that leaf:
Combine any number of action types or action creators. `actionTypes` is a list of positional arguments which can be action type strings, symbols, or action creators.
230
+
Combine any number of action types or action creators. `types` is a list of positional arguments which can be action type strings, symbols, or action creators.
193
231
194
232
This allows you to reduce multiple distinct actions with the same reducer.
0 commit comments