Fork me on GitHub
Drew Verlee01:07:54

When using re-frame with react native is there anything special to consider?


Nope. re-frame operates above that level.

👍 4
Drew Verlee13:07:28

I recall you saying that. I just wanted to be super sure i understood you correctly. When i was reading the docs they seemed so geared towards web development that i assumed their was some coupling there. Very happy its not, makes the entire thing way more useful. that and it was the best question i could come up with at 9:45pm -_-


I have a patter similar to this one throughout may of my views:

(let [a @(subscribe [:a])
      b @(subscribe [:b a])]
I'd like to refactor it into a single subscription. I don't want to just compose the functions in subscriptions because this way the new sub will be run each time db is changed. I only want it to be run when either [:a] or [:b a] changes. I was thinking about returning a reaction as a signal fn. Something like:
(reg-sub :a-b
  (fn [_]
    (reagent/reaction @(subscribe [:b @(subscribe [:a]))))
  (fn [b _]
Does anyone have any thoughts?



 (fn [_]
   (subscribe [:a]))
 (fn [a]
   (compute-b a)))
? (


sorry - I think I misunderstood - ignore the comment above.


is :a-b supposed to return just b? If so, it should look like:

 (fn [_]
   (subscribe [:a]))
 (fn [a]
   (compute-a-b a)))


The problem here is that :b is a rather complicated subscription. It has different signals that depend on a (and other parameters in reality). So, using just the computation function for :b is not that simple.


The solution with a reaction appears to be working though.


hi I guess this is more of a cljs-ajax question, but I’m using the xhrio effects with the default transit encoding. I’ve just noticed that the default deserailization for some types (uuid’s, large integers, etc) is to transit specific types, not say the ‘default’ uuid in clojurescript. Anyone have any quick workarounds for this?