re-frame

Kimo 2025-10-22T20:54:24.396199Z

New FAQ article: https://day8.github.io/re-frame/FAQs/why-didnt-my-component-update/

p-himik 2025-10-23T07:11:52.965389Z

Hmm. I don't see anything wrong with the code.

lassemaatta 2025-10-23T07:14:17.322359Z

neither did I 🙂 But if I understood the situation correctly, the problem is that the subscriptions/reactions were never deferred, at least not within that subscription. https://github.com/day8/re-frame/blob/492838f859261829e1d4ff5aa0aaa91729a08816/src/re_frame/subs.cljc#L162

lassemaatta 2025-10-23T07:15:06.643909Z

replacing identity with (fn [args] (println (type args))) => LazySeq 💡

p-himik 2025-10-23T07:36:44.796549Z

Oh wow, good catch. I'd say it definitely should be mapv there.

Kimo 2025-10-23T07:49:48.288789Z

Thanks, I've been meaning to look at that piece. There's also this issue with it - https://github.com/day8/re-frame/issues/545

p-himik 2025-10-22T22:34:32.862159Z

Cool! Had no idea about multimethods. Yet another reason to avoid them where no openness is needed.

Kimo 2025-10-22T22:44:17.641019Z

Yeah, but it's sad because I really like using multimethods. The first workaround isn't so bad.

p-himik 2025-10-22T23:01:59.445339Z

I stopped liking them as soon as I had to debug them. :D Nice when you need extensibility, but a huge liability as compared to case/cond otherwise.

lassemaatta 2025-10-23T04:54:25.942139Z

I found a new fun way to accidentally break updating a while ago. I did something a bit like

(rf/reg-sub ::foo-and-bar-and-quuz
  (fn [_]
    [(rf/subscribe [::foo])
     (rf/subscribe [::bar])
     (rf/subscribe [::quuz])])
  :-> identity))
iow. I wanted to return a coll of the return values of those three subs. It almost worked, but not quite.