Skip to content

Commit 197da51

Browse files
committed
Update README.md
1 parent ca1866b commit 197da51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import * as CounterActions from '../actions/CounterActions';
5151

5252
class CounterApp {
5353
constructor( @Inject('ngRedux') ngRedux) {
54-
this.unsubscribe = ngRedux.connect(this.mapStateToScope, this.mapDispatchToProps)(this);
54+
this.unsubscribe = ngRedux.connect(this.mapStateToThis, this.mapDispatchToThis)(this);
5555
}
5656

5757
onInit() {}
@@ -60,13 +60,13 @@ class CounterApp {
6060
this.unsubscribe();
6161
}
6262

63-
mapStateToScope(state) {
63+
mapStateToThis(state) {
6464
return {
6565
counter: state.counter
6666
};
6767
}
6868

69-
mapDispatchToProps(dispatch) {
69+
mapDispatchToThis(dispatch) {
7070
return { actions: bindActionCreators(CounterActions, dispatch) };
7171
}
7272
}
@@ -94,7 +94,7 @@ Connects an Angular component to Redux.
9494

9595
e.g:
9696
```JS
97-
connect(this.mapState, this.mapDispatch)(this);
97+
connect(this.mapStateToThis, this.mapDispatchToThis)(this);
9898
//Or
9999
connect(this.mapState, this.mapDispatch)((selectedState, actions) => {/* ... */});
100100
```

0 commit comments

Comments
 (0)