I am building an application using riot.js and jquery. Everything works as expected, however as the code grows, so does my worry that triggering and handling events (.trigger/.on) in random/unexpected places in the code is doing nothing to keep my code organized and quickly understandable.
My questions are:
(1) I would like to keep code for such an application clean and streamlined (event namespaces is one thing that comes to my mind) and
(2) I would like to keep the events on the model clearly separated from events on the DOM in the presenter. How can I achieve these goals in a riot.js based application
Thank you.
You could look at a functional reactive programming approach. Here are some solutions you may be insterested in:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With