Skip to content

Commit 4851cf4

Browse files
committed
Merge pull request #18 from wbuchwalter/bc-1.0.0
Doc updated
2 parents 2c7b197 + a401267 commit 4851cf4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,26 @@ class CounterController {
7676

7777
## API
7878

79-
### `createStoreWith([reducer], [middlewares], [storeEnhancers])`
79+
### `createStoreWith(reducer, [middlewares], [storeEnhancers])`
8080

8181
Creates the Redux store, and allow `connect()` to access it.
8282

8383
#### Arguments:
84-
* [`reducer`] \(*Function*): A single reducer composed of all other reducers (create with redux.combineReducer)
84+
* `reducer` \(*Function*): A single reducer composed of all other reducers (create with redux.combineReducer)
8585
* [`middlewares`] \(*Function[]*): Optional, An array containing all the middleware that should be applied. Functions and strings are both valid members. String will be resolved via Angular, allowing you to use dependency injection in your middlewares.
8686
* [`storeEnhancers`] \(*Function[]*): Optional, this will be used to create the store, in most cases you don't need to pass anything, see [Store Enhancer official documentation.](http://rackt.github.io/redux/docs/Glossary.html#store-enhancer)
8787

8888

89-
### `connect([scope], [mapStateToTarget], [mapDispatchToTarget])([target])`
89+
### `connect(mapStateToTarget, [mapDispatchToTarget])(target)`
9090

9191
Connects an Angular component to Redux.
9292

9393
#### Arguments
94-
* [`mapStateToTarget`] \(*Function*): connect will subscribe to Redux store updates. Any time it updates, mapStateToTarget will be called. Its result must be a plain object, and it will be merged into `target`.
94+
* `mapStateToTarget` \(*Function*): connect will subscribe to Redux store updates. Any time it updates, mapStateToTarget will be called. Its result must be a plain object, and it will be merged into `target`. If you have a component which simply triggers actions without needing any state you can pass null to `mapStateToTarget`.
9595
* [`mapDispatchToTarget`] \(*Object* or *Function*): Optional. If an object is passed, each function inside it will be assumed to be a Redux action creator. An object with the same function names, but bound to a Redux store, will be merged onto `target`. If a function is passed, it will be given `dispatch`. It’s up to you to return an object that somehow uses `dispatch` to bind action creators in your own way. (Tip: you may use the [`bindActionCreators()`](http://gaearon.github.io/redux/docs/api/bindActionCreators.html) helper from Redux.).
9696

9797
*You then need to invoke the function a second time, with `target` as parameter:*
98-
* [`target`] \(*Object* or *Function*): If passed an object, the results of `mapStateToTarget` and `mapDispatchToTarget` will be merged onto it. If passed a function, the function will receive the results of `mapStateToTarget` and `mapDispatchToTarget` as parameters.
98+
* `target` \(*Object* or *Function*): If passed an object, the results of `mapStateToTarget` and `mapDispatchToTarget` will be merged onto it. If passed a function, the function will receive the results of `mapStateToTarget` and `mapDispatchToTarget` as parameters.
9999

100100
e.g:
101101
```JS

0 commit comments

Comments
 (0)