In ES5:
var TodoApp = React.createClass({
mixins: [ReactFireMixin], //working fine
...
});
In ES6: (created using react cli )
class TodoApp extends Component {
constructor(props) {
super(props)
}
mixins= [ReactFireMixin] //not working
...
}
what is the correct way of doing this?
react-mixin solved my problem
CODE:
class TodoApp extends Component {
constructor(props) {
super(props)
}
...
}
reactMixin(TodoApp .prototype, ReactFireMixin);