Fork me on GitHub
Thomas Meier02:09:15

Hi, I'm trying out interop with React. I am trying to use this have included it with (:require ["react-trello" :as rt]) and then using it in hiccup like [rt/Board ...] but that says it is undefined. I've also tried [:> rt/Board and :r>. Both say undefined. I tried using :refer [Board] instead with the same result. I'm not sure how to handle this case.


Using shadow-cljs ?


Also, in a cljs repl, can you see the value of rt or rt/Board /

Thomas Meier02:09:49

Yes on shadow-cljs

Thomas Meier02:09:37

rt is a #js object, Board is undefined.


rt probably is Board. If it looks like a component, use :as Board. If it has a default field, use :default Board. In any case, you can use this table, but make sure to read the whole section since there can be subtleties:

👍 1