3 ms·
Since mixins are not supported in combination with classes[1] there is no way. I just fall back to React.createClass when I need mixins (afaik this is also what
by tranver 11y ago
Since mixins are not supported in combination with classes[1] there is no way. I just fall back to React.createClass when I need mixins (afaik this is also what Facebook does).
A lot of libraries, including react-router, are considering decorators as an alternative.[2]
[1] http://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#mixins http://facebook.github.io/react/blog/2015/01/27/react-v0.13....
[2] https://github.com/rackt/react-router/issues/1173 https://github.com/rackt/react-router/issues/1173
- seivan 11y agoThanks! I suspected so, but I wasn't sure. I've found that you get a lot of messy variations when doing ES6 compared to sticking with ES5 or CoffeeScript. Not to mention the issues with all the god damn different build tools, it gets hard to get something standardised and good.