Fork me on GitHub
#cljsjs
<
2018-09-14
>
rkiouak15:09:15

I am using my first cljsjs package (cljsjs/react-chartjs-2 https://github.com/cljsjs/packages/tree/master/react-chartjs-2) and struggling a bit with api. Neither (js/ReactChartjs2.Pie #js{:data (clj->js data)}) nor (js/ReactChartjs2.Pie. #js{:data (clj->js data)}) seem to return the ReactNode as I expect, though the latter constructor call does return an object.

rkiouak15:09:12

Could I bother someone to help me figure out what process I should take for debugging cljsjs type usage like this?

fabrao19:09:28

@mrkiouak you must see the .js file and use react functions like :

(def chartjs2 js/ReactChartjs2)
(def Pie (rg/adapt-react-class (goog.object/get chartjs2 "Pie")))