Hello, is the second subscription supposed to trigger a cache hit in that example?
(with-let [a @(subscribe [:a])] (finally (with-let [b @(subscribe [:a])]))
re-frame-10x provides some information about subscription dynamics
You haven't really provided enough information to answer your second question. I guess the general answer is that cache hits will occur if the subscription already exists, and not otherwise.
@mikethompson thanks, I'll look into it. Well shouldn't the cache be updated as soon as
@(subscribe [:a]) is run?
oh sorry, I the code was actually wrong, I will edit it
the first binding of the second with-let is actually a subscription to
A bit unrelated - I'm not sure about using
with-let inside the
finally block. I may be wrong, but it sounds like a potential way to create leaks.
By potentially not calling
dispose!. Better to ask in #reagent about using reactions in
Either way, if you're not sure why you need
with-let in particular inside
finally, then probably you need just
oh yeah, you mean the inner
with-let. Well I think
dispose! is called anyway, even with no
finally` . That's what I understood at least, I'm not sure. I agree that
I agree that
let would work, though