On Wednesday, March 30, 2016 at 9:40:46 AM UTC+11, Luke Horton wrote:
> I see, thanks for that. I guess I was avoiding that strategy initially 
> because it sort of felt like monkey patching in ruby/js, which is just bound 
> to break eventually. It's not monkey-patching in this respect, though, it's 
> just app-specific api design.


Yes, indeed, it isn't monkey patching at all.  re-frame was designed 
specifically for this to happen.  Notice how you can supply vectors of 
middleware with arb nesting, to allow for middleware composition in this way. 

And, sometimes we also have an app specific "dispatch" too.  We generally name 
it "emit", and this function can do whatever you want before eventually calling 
"dispatch". If you needed it to, "emit" can add an entirely different level of 
routing, including the ability to "look something up" based on the event 
supplied, and then dispatch twice or three times based on the results of that 
lookup - I'm thinking of module "a" and module "b" from your original post.

So it is all pretty flexible as-is.

--
Mike

 

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to