Skip to content

Commit 70fda76

Browse files
committed
Merge pull request reduxjs#324 from moroshko/patch-4
Fix `bindActionCreators` example
2 parents 3055a83 + 808c32d commit 70fda76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/Reference/API.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,10 @@ store.
303303
304304
```js
305305
// actionCreators.js
306-
function addTodo(text) {
306+
export function addTodo(text) {
307307
// ...
308308
}
309-
function removeTodo(id) {
309+
export function removeTodo(id) {
310310
// ...
311311
}
312312

@@ -320,7 +320,7 @@ console.log(actionCreators);
320320
store.dispatch(actionCreators.addTodo('Use Redux'));
321321

322322
// But it can be handy to bind action creators to a store instance:
323-
let boundActionCreators = bindActionCreators(action, store.dispatch);
323+
let boundActionCreators = bindActionCreators(actionCreators, store.dispatch);
324324
boundActionCreators.addTodo('Use Redux');
325325
// You can pass them down and decouple components below from the Redux store.
326326
```

0 commit comments

Comments
 (0)