Fork me on GitHub
#re-frame
<
2023-06-07
>
Ryan12:06:57

Hey all, I have a materialized view that uses an ID stored in a subscription and a subsequent subscription using said ID to extract the final calculated value. Is something like this workable?

(reg-sub prepared-item
  :<- [::prepared-item-id]
  :<- [::item prepared-item-id]
  (fn [prepared-item-id item]
    (calculate item))) 

p-himik13:06:18

You can use reg-sub-raw for it. Or extract the signals into their own sub and use it as a signal sub here.

Ryan13:06:57

Thanks @U2FRKM4TW those options make great sense 🙂

👍 2