Fork me on GitHub
#rum
<
2022-09-16
>
Eric Dvorsak09:09:05

Hi! I guess I'm doing something wrong but I can't figure out what I'm trying this minimal example from the repo:

(rum/defc value < rum/reactive
  [*ref]
  [:code (pr-str *ref #_(rum/react *ref))])

(rum/defc inputs2 []
  (let [*ref (atom 1)]
    [:dl
     [:dt (value *ref)]]))
but *ref is printed as #js {"0" #object[cljs.core.Atom {:val 1}]} so when I try to call rum/react it can't deref since the atom is actually nested in that js array. I don't get what I'm missing :thinking_face:

Jan K10:09:42

To me it seems like it should work... maybe a problem of incompatible versions of cljs and rum?

Eric Dvorsak12:09:56

thanks, indeed going back to a previous version of shadow-cljs fixes it