Skip to content

Commit 0a6d652

Browse files
committed
2 parents b2acada + 68a05c6 commit 0a6d652

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ redux-actions
1010
npm install --save redux-actions
1111
```
1212

13-
### `createAction(type, actionCreator = Identity)`
13+
### `createAction(type, payloadCreator = Identity, ?metaCreator)`
1414

15-
Wraps an action creator so that its return value is the payload of a Flux Standard Action. If no action creator is passed, or if the action creator is not a function, the identity function is used.
15+
Wraps an action creator so that its return value is the payload of a Flux Standard Action. If no payload creator is passed, or if it's not a function, the identity function is used.
1616

1717
Example:
1818

@@ -35,6 +35,8 @@ Use the identity form to create one-off actions:
3535
createAction('ADD_TODO')('Use Redux');
3636
```
3737

38+
`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.
39+
3840
### `handleAction(type, reducer | reducerMap)`
3941

4042
Wraps a reducer so that only handles Flux Standard Actions of a certain type.

0 commit comments

Comments
 (0)