jimsparkman / RiotControl

Event Controller / Dispatcher For RiotJS, Inspired By Flux
http://jimsparkman.github.io/RiotControl/routing_demo/
MIT License
598 stars 48 forks source link

[QUESTION] What you think about riotux? #31

Closed luisvinicius167 closed 8 years ago

luisvinicius167 commented 8 years ago

Hi, what you think about riotux Event Controller?

riotux provides more organization for datastore in your application. Your Stores can call and listen events to other Stores and Components, that can call and listen events to Stores too. The Dispatcher is used to communicate between Components.

Thanks!

a-moses commented 8 years ago

hay what the different between riotux to RiotControl ? update: Thank you @luisvinicius167

luisvinicius167 commented 8 years ago

@a-moses, riotux provides more organization for datastore in your application. In RiotControl if you has 2 Stores listening the event 'add_todo' and when you use RiotControl.trigger('add_todo'), your 2 stores will listen and trigger the callback. But imagine that you just want trigger the 'add_todo' to Store A, you don't get.

With riotux , you can! Just pass the Store Name. riotux.trigger('StoreA', 'add_todo') and just the Store A will send the callback. This way, you don't be lost. Read the Readme.md for you know about riotux :)

jimsparkman commented 8 years ago

Clean and simple, I like it!

luisvinicius167 commented 8 years ago

@jimsparkman, nice! :)