Answer the question
In order to leave comments, you need to log in
How to properly write mixins in es6 for Reactjs?
In plain ES5 style I wrote like this
var PostsConteiner = React.createClass({
mixins: [ Reflux.connect(PostStorage, "postList") ],
render: function() {
export default class PostsConteiner extends React.Component {
Answer the question
In order to leave comments, you need to log in
ReactJS official documentation says ES6 syntax doesn't support mixins
Unfortunately ES6 launched without any mixin support. Therefore, there is no support for mixins when you use React with ES6 classes. Instead, we're working on making it easier to support such use cases without resorting to mixins.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question