lukehoban/es6features

React + Flux Store Example in ES6

badnorseman opened this issue · 3 comments

How would you write this in ES6?

var EventEmitter = require("events").EventEmitter
var assign = require("react/lib/Object.assign")
...
var ProductStore = assign({}, EventEmitter.prototype, {
...
emitChange: function() {
this.emit("change")
},

Perhaps this is a question better for StackOverflow, instead of filed as a bug on the ES6 feature showcase?

IMO framework-specific examples are not a great fit. But that's the last I'll say on the matter.

tiye commented

Probably an issue related to Babel https://gitter.im/babel/babel