0.9.1 • Published 10 years ago

reflux-dispatcher v0.9.1

Weekly downloads
6
License
MIT
Repository
github
Last release
10 years ago

reflux-dispatcher

a hot reload friendly dispatcher for reflux

##Usage

var dispatcher = require('reflux-dispatcher')();
var action = dispatcher.actions;
var store = dispatcher.stores;

//actions don't need to be deslared before use
action('signin').listen(function(user) {
  console.log('hello ', user.username);
});
action('signin')({username: 'undozen', password: '123'});

//store definition
store('session', {
  init: function () {
    this.listenTo(action('signin'), this.signin);
  },
  signin: function (user) {
    //do ajax signin etc...
  }
});

//laterly, you can redefined store('session')
//so here is what I mean by "hot reload friendly"
store('session', {/* new definition */});

##License MIT

0.9.1

10 years ago

0.9.0

10 years ago

0.7.5

10 years ago

0.7.4

10 years ago

0.7.3

10 years ago

0.7.2

10 years ago

0.7.1

10 years ago

0.7.0

10 years ago

0.6.2

10 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.3

10 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago