Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* @flow */
var Reflux = require('reflux');
var Actions = require('./actions');
var Store = Reflux.createStore({
listenables: Actions,
onChangeShowingProperty: function(item) {
console.log('onChangeShowingProperty');
this.trigger(item);
},
});
module.exports = Store;
// Includes
var Reflux = require('reflux');
var I = require('seamless-immutable');
var resource = require('../mixins/resource');
var PaymentOptionsStore = Reflux.createStore({
// Public
mixins: [resource('paymentOptions')],
onSetPaymentOptions: function(args) {
t.paymentOptions = I(args);
t.trigger({ paymentOptions: t.paymentOptions });
}
});
var t = module.exports = PaymentOptionsStore;
'use strict';
var Reflux = require('reflux'),
Im = require('immutable'),
accountDefault = require('../../constants/defaults').account,
AuthAccountActions = require('../../actions/authentication/AuthAccountActions');
var AccountStore = Reflux.createStore({
listenables: AuthAccountActions,
init: function() {
this.account = Im.Map(accountDefault);
},
getAccount: function() {
return this.account.toJS();
},
/* Listen AuthAccountActions
===============================*/
_mergeAccountData: function(resData) {
this.account = this.account.merge(Im.Map(resData));
this.trigger();
it('does nothing initially', function() {
myStore = Reflux.createStore({
mixins: [listenAndMix(myAction, 'callback')],
callback: callback
});
assert(callback.notCalled);
});
'#85678f',
'#5e8d87',
'#707880',
'#373b41',
'#cc6666',
'#b5bd68',
'#f0c674',
'#81a2be',
'#b294bb',
'#8abeb7',
'#c5c8c6'
]
}).colors;
}
var AppStore = Reflux.createStore({
init: function () {
this.listenTo(actions.setAllColors, this._setAllColors);
this.listenTo(actions.setColor, this._setColor);
this.listenTo(actions.setFont, this._setFont);
},
getState: function () {
return state;
},
_setAllColors: function (name, colors) {
state.scheme = name;
state.colors = colors;
updateUrl();
this.trigger(state);