I
I
Isaac Clark2015-12-11 17:17:07
JavaScript
Isaac Clark, 2015-12-11 17:17:07

How to use mixins in React.js ES6/7?

Hello.
Such a question: before writing in ES6 syntax, I wrote like this:

module.exports = React.createClass({
    mixins: [
        Reflux.listenTo(ListStore, 'onChangeList')
    ]
...

But what about the transition to ES6, because if I'm not mistaken, mixins were excluded there?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Gushchin, 2015-12-11
@Dark_Knight

Yes, there are no mixins now. Use decorators -> https://github.com/brigand/react-mixin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question