https://github.com/hermanya/listenable-counter
https://github.com/hermanya/listenable-counter
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hermanya/listenable-counter
- Owner: Hermanya
- Created: 2016-07-30T16:18:02.000Z (almost 10 years ago)
- Default Branch: gh-pages
- Last Pushed: 2016-07-30T21:44:15.000Z (almost 10 years ago)
- Last Synced: 2024-12-28T03:42:12.853Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://hermanya.github.io/listenable-counter/
- Size: 622 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Counter example for [listenable browser](https://github.com/hermanya/listenable-browser)
----------------------------------------------------------------------------------------
This repo is basically a clone of [redux counter example](https://github.com/reactjs/redux/tree/master/examples/counter). The only modification I made is I added following code in ./components/Counter.js's `render` method:
```javascript
say(`Counter value is ${value}`).then(() => listenForUserInput({
'increment': onIncrement,
'increment if odd': this.incrementIfOdd,
'increment asynchronously': this.incrementAsync,
'decrement': onDecrement
}))
```
I also added a [polyfill](https://hermanya.github.io/listenable-browser/support_for_other_browsers.js) for other than listenable browsers:
```html
```