re-frame

2026-06-18T13:05:13.014289Z

@rolthiolliere is this something you do with v1 re-frame?

rolt 2026-06-18T13:51:23.870059Z

Yes, we have quite a few in our codebase, either wrapping the signal fn body in a reaction or using reg-sub-raw

rolt 2026-06-18T15:50:21.733989Z

Some of those cases actively relies on the caching for performances, say if we have part of the db like this:

{:article {:id0 {:comments [:id1 :id2] ...}} :comment {:id1 {...} :id2 {...}}
We would use those subscriptions
(reg-sub-raw :consolidated-article
  (fn [[_ article-id]]
    (r/reaction
     (let [article @(sub [:article/by-id article-id])
       (update article :comments #(mapv (fn [comment-id] @(sub [:comment/by-id comment-id])) %))))
this is a limited part of the app though, I think I need to try the resources part of re-frame2 to see if it could replace this usage