React + Flux Store Example in ES6
badnorseman opened this issue · 3 comments
badnorseman commented
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")
},
domenic commented
Perhaps this is a question better for StackOverflow, instead of filed as a bug on the ES6 feature showcase?
domenic commented
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