spoike/refluxjs — pull request #121 by deviousdodo (2014-11-14 00:49:44+00:00)
Title: Allow extension of actions and stores

Currently the only way to add methods for actions and stores is through `Reflux.PublisherMethods`. While this works, it does not always make sense to have the same methods for both of them. For example in my current project I use a `handler` method which simplifies using actions directly on click:
```javascript
_.extend(Reflux.PublisherMethods, {
handler: function() {
var functor = this, args = arguments;
return function(event) {
event.preventDefault();
functor.apply(null, args);
};
},
});
// now I can do Link
```
Similarly, for stores I have some state-handling methods which don't make sense for actions. So in order to have a bit more control I created 2 empty objects `Reflux.ActionMethods` and `Reflux.StoreMethods` which allow to extend actions and stores separately.