{ "devDependencies": { "babelify": "^6.1.2", "browserify": "^10.2.4", "watchify": "^3.2.3" }, "scripts": { "watch": "watchify -t babelify src/app.jsx -o dest/app.js -v" }, "dependencies": { "flux": "^2.0.3", "react": "^0.13.3" } } import {EventEmitter} from 'events'; import React from 'react'; import AppDispatcher from './app_dispatcher'; const COUNTER_CONST = { UPDATE_COUNTER: 'UPDATE_COUNTER' };
![ReactJS + facebook/flux を ES6 の記述でカウンターのサンプル - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/0cfeecd1d27293e170ca373c9cb4c6cef005b3c6/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-9f5428127621718a910c8b63951390ad.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTkxNiZoPTMzNiZ0eHQ9UmVhY3RKUyUyMCUyQiUyMGZhY2Vib29rJTJGZmx1eCUyMCVFMyU4MiU5MiUyMEVTNiUyMCVFMyU4MSVBRSVFOCVBOCU5OCVFOCVCRiVCMCVFMyU4MSVBNyVFMyU4MiVBQiVFMyU4MiVBNiVFMyU4MyVCMyVFMyU4MiVCRiVFMyU4MyVCQyVFMyU4MSVBRSVFMyU4MiVCNSVFMyU4MyVCMyVFMyU4MyU5NyVFMyU4MyVBQiZ0eHQtY29sb3I9JTIzMjEyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTU2JnR4dC1jbGlwPWVsbGlwc2lzJnR4dC1hbGlnbj1sZWZ0JTJDdG9wJnM9NzNhOGY1ZTRlMzY4YjQxY2NmNTcwZjdjMDA3YzNhNmQ%26mark-x%3D142%26mark-y%3D112%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTYxNiZ0eHQ9JTQwY29ydHl1bWluZyZ0eHQtY29sb3I9JTIzMjEyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTM2JnR4dC1hbGlnbj1sZWZ0JTJDdG9wJnM9MmFhODcwNDc3NDZkMjg4YzI4YzhhZmVhZDAxMGE0ODU%26blend-x%3D142%26blend-y%3D491%26blend-mode%3Dnormal%26s%3Daa09cd54aec3d81ad4a8a81928e0777e)