There was handler middleware for helping with deeply nested structure

middleware/path
A middleware factory which supplies a sub-tree of `db` to the handler.
  Works a bit like update-in. Supplies a narrowed data structure for the 
handler.
  Afterwards, grafts the result of the handler back into db.
  Usage

https://github.com/Day8/re-frame/blob/master/src/re_frame/middleware.cljs

So if your data is at :path :to :value, you could have a middleware handle 
definition like:

(register-handler :some/key (path [:path :to :value]) hander-fn)

Then handler-fn would be passed the value, and all you need to return is the 
updated value from the handler-fn, it will be placed into the app at the path 
location.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to