Fork me on GitHub

I’m having a problem with subscriptions, and I’m not sure how to proceed to try and resolve it. I’m feeding input signals through a series of subscriptions, and at a certain point they just stop flowing.

 :<- [:forms/user-form]
 (fn [user-form]
   (prn {:filter (get-in user-form [:modal-group-filter :input/value])})
   (:modal-group-filter user-form)))

 :<- [:user-form/modal-group-filter]
 (fn [filter-data]
   (println "Intermediate sub returning" (pr-str (:input/value filter-data)))
   (:input/value filter-data)))
This is in the overall context of typing a search string into an input field to filter a large list of groups down to a manageable size. As I type, my debug string is printing out the {:filter "foo"} output, one for each character I type. The debug printout in the dependent subscription, however is never printed. It prints once when the component first renders, but does not update as I type.


For me it looks like reagent somehow counts (:modal-group-filter user-form) as unchanged.


Yeah, that’s what it looks like. I use the same pattern almost everywhere, and they all work fine. It’s just this one link in the signal tree that fails.


I wonder if it has anything to do with the fact that the input field subscribes to the sub that does work.


IOW multiple subscriptions to the same sub. :thinking_face:


AFAIK multiple subscriptions to the same sub shouldn't cause anything like that.


Looking at the reg-sub code you could try to use traces that are baked into re-frame


Or, as usual, put a println everywhere and remove possible causes one-by-one.


@manutter51 Are you dereferencing the two subscriptions from the same exact place?