Reflux Vue
A mixin helpers link the Reflux and the Vue
Usages
most usages are same as Reflux, only the mixins for Vue component have little differences.
Convenience mixin for React
const vm =mixins: RefluxListenerMixin{this;}methods{// update the data of TheStore to vmthisstate = state;};
Using Reflux.listenTo
const vm =mixins:Refluxmethods{thisstate = state;// or};
Using Reflux.connect
For connect
method, we prefer to set the getInitialState
to initial the data structure which need to sync.
const TheStore = Reflux;
const vm =mixins:Refluxmethods:{// this.state === 'open'};
Using Reflux.connectFilter
const vm =mixins:Reflux)methods:{// this.state === 'open!!!'};