Skip to content

Commit 2d52ea7

Browse files
committed
Clarify bindActionCreators
1 parent b9a135a commit 2d52ea7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ redux-actions is handy all by itself, however, it's real power comes when you co
7979
The identity form of `createAction` is a great way to create a single action creator that handles multiple payload types. For example, using [redux-promise](https://github.com/acdlite/redux-promise) and [redux-rx](https://github.com/acdlite/redux-rx):
8080

8181
```js
82-
const addTodo = createAction('ADD_TODO');
82+
let addTodo = createAction('ADD_TODO');
8383

8484
// A single reducer...
8585
handleAction('ADD_TODO', (state = { todos: [] }, action) => ({
@@ -88,6 +88,8 @@ handleAction('ADD_TODO', (state = { todos: [] }, action) => ({
8888
}));
8989

9090
// ...that works with all of these forms:
91+
// (Don't forget to use `bindActionCreators()` or equivalent.
92+
// I've left that bit out)
9193
addTodo('Use Redux')
9294
addTodo(Promise.resolve('Weep with joy'));
9395
addTodo(Observable.of(

0 commit comments

Comments
 (0)