Closed yoshuawuyts closed 10 years ago
Or possibly:
dispatcher.dispatch('user_login', {foo: 'bar'});
I've settled on merging barracks()
and .register()
:
var barracks = require('barracks');
var dispatcher = barracks({
user: {
login: function() {},
logout: function() {}
},
course: {
create: function() {},
remove: function() {}
}
});
dispatcher.dispatch('user_login', {foo: 'bar'});
Change the
.register()
syntax to be something like:So the .dispatch() syntax should become something like: