Skip to content

Commit

Permalink
update demo to use Snoopy's new map fn feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Hug committed Jan 23, 2016
1 parent cc62d6e commit 302db83
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
counter.set('even', val % 2 === 0);
});

counter.snoop('even', function(even) {
counter.set('evenText', even ? 'even.' : 'not even.');
});

// <button>0</button>
var button = dom([
{
Expand All @@ -67,7 +63,9 @@
_disabled: true
},
counter.snoop('count'), ' is ',
counter.snoop('evenText')
counter.snoop('even', function(even) {
return even ? 'even.' : 'not even.';
})
]
}
]);
Expand Down

0 comments on commit 302db83

Please sign in to comment.