Fork me on GitHub
#re-frame
<
2023-05-11
>
hifumi12309:05:00

If I have a function that derefs a subscription but also renders a component deref-ing the subscription in a reaction (and disposing the reaction on unmount), does this still present a problem with memory leaks? I want to say no, but I want a second pair of eyes to review this logic.

p-himik09:05:37

Should be alright.

hifumi12309:05:26

Unfortunately rf/subscribe will still warn me about calling outside of a reactive context (which I can totally understand, because my use case is extremely subtle), but I feel uncomfortable using with-redefs to surpress the warning in this case

p-himik09:05:50

I wrote a wrapper for subscribe for a similar use-case that uses the cache read-only and doesn't emit the warning - works just fine. :)

p-himik09:05:58

Sorry, not a wrapper but an alternative implementation.

👍 2
BuddhiLW17:05:29

I think I have asked this question here, but anyways, I will link it. I'm having issues making HTTP requests to work, with http-fx. Could anyone give me a hand? Maybe I'm doing something trivially wrong. https://clojurians.slack.com/archives/C03S1L9DN/p1683826681240629

Nasiru Ibrahim06:05:52

Have you printed (console) your ur and is to see if they are really showing up as expected?