Fork me on GitHub
#re-frame
<
2019-05-30
>
Matt Butler14:05:29

Hey, when following the approach outlined here https://github.com/Day8/re-frame/blob/master/docs/Subscribing-To-External-Data.md where you use reg-sub-raw to go fetch data as a side effect then return a reaction on where that data ends up in the database. What is the idiomatic way of making this sub reactive to another subscription? (Or other way of kicking it off again based on a something changing). I'm using the 3rd arg (dynv) of subscribe to achieve this currently, but the source code comment suggests this is deprecated. Is there another way or is the entire approach of fetching data is subs also now depreciated?

manutter5114:05:05

I think you might want effects/co-effects for this.

Matt Butler15:05:29

Haha, I now realise there is a disclaimer confirming that this approach is retired at the top of the aforementioned doc. Whoops :D