Clojurians
#lambdaisland
<
2017-10-25
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

plexus12:10:43

@dhruv1 you'd have to check the docs for the JS lib

plexus12:10:36

is js/Draggable defined? that seems to be the way to go...

dhruv114:10:07

@plexus i am not sure why the libraries from cljsjs i required in my project.clj file weren’t loading properly. since draggable wasn’t loading properly, calling js/ReactDraggable would result in undefined. what i did after was require cljsjs.react-draggable in the core ns, this is also where init function is defined. after that i was able to use js/ReactDraggable.

dhruv114:10:27

ReactDraggable is the var name specified in the externs file in the cljsjs package. that’s how i determined what the global name defined in js library. another way to verify is to open the chrome console and type in and see if the suggestions drop down has the variable. ie: in the console window, type Rea and the suggestion window will contain ReactDraggable. that is also how i verified that my js library loaded properly