cljsjs

rkiouak 2018-09-14T15:10:15.000100Z

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.

rkiouak 2018-09-14T15:11:12.000100Z

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

fabrao 2018-09-14T19:11:28.000100Z

@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")))