Skip to content

Commit

Permalink
Update CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ellbee authored Mar 27, 2017
1 parent 6e2c3c0 commit fb8dd53
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,23 @@ const mySelector = createSelector(
}
)

var state1 = {values: [1,2,3,4,5,6,7,8,9]};
state1 = {values: [1,2,3,4,5,6,7,8,9]};
var state2 = {values: [1,2,3,4,5,6,7,8,9]};
var state3 = {values: [3,4,5,6,7]};
var createSelector = require('./dist/reselect.js').createSelector;

const mySelector = createSelector(
state => state.values.filter(val => val < 5),
values => {
console.log('calling..')
return values.reduce((acc, val) => acc + val, 0)
}
)

var state1 = {values: [1,2,3,4,5,6,7,8,9]};
console.log(mySelector(state1));
state1.values = [3,4,5,6,7,8,9];
console.log(mySelector(state1));
var state2 = {values: [1,2,3,4,5,6,7,8,9]};
console.log(mySelector(state2));
var state3 = {values: [3,4,5,6,7]};
console.log(mySelector(state3));
```

Expand All @@ -44,7 +53,7 @@ console.log(mySelector(state3));
calling..
10
calling..
10
7
calling..
10
calling..
Expand Down

0 comments on commit fb8dd53

Please sign in to comment.