خرید بک لینک

Vote count: 0

I have 2 Stores a lot similar. First listen react on dispatch() right but another dont. My dispatcher:

var Dispatcher = require('flux').Dispatcher;
var JustDispatcher = new Dispatcher();

  JustDispatcher.handleAction = function(action){
  console.log('dispatcher',action);
   this.dispatch({
    source: 'VIEW_ACTION',
    action: action
  });


  };
module.exports = JustDispatcher;

and my store which dont react:

LanguageDispatcher.register(function(payload){
  console.log('languageStore');
  var action = payload.action;
  switch(action.actionType){
    case languageConstants.SWITCH_LANGUAGE:
      console.log(action.data);
      setData(action.data);
      languageStore.emit(CHANGE_EVENT);
      break;
    default:
      retu true;
  }
});

and which react:

  GraphDispatcher.register(function(payload){
  console.log('graphStore');
  var action = payload.action;
  switch(action.actionType){
    case graphConstants.REFRESH_ITEM:
          setQMDec(action.data[0].QM_detected);
          setQMRem(action.data[0].QM_removed);
          setDescription(action.data[0].device);
          graphStore.emit(CHANGE_EVENT);
          break;
    default:
          retu true;
  }
});

dispacher register actionEvent correctly, then fill data and action type correctly too. But after action SWITCH_LANGUAGEconsole still print only graphStore but languageStore dont... All imports I have.. so i don't know where is the problem.. anyone know ?

asked 19 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 1 مرداد 1395 ساعت: 14:03

صفحه بندی