score:3

Accepted answer

It boils down to how you want to do JavaScript interop... you have 3 choices:

  1. Include the js from your HTML file
  2. Build it as part of your compilation
  3. Include it as a library

I encourage you to try (3); it isn't difficult, just follow the steps on CLJSJS https://github.com/cljsjs/packages/wiki/Creating-Packages

score:0

Use ClojureScript's compiler options to include the external JS in the build, then use reagent's adapt-react-class to use the component in your reagent views. Try not to depend on projects like CLJSJS.

Doing this yourself will keep you in control of your project.

in project.clj

:foreign-libs [{:file "https://rawgit.com/felixrieseberg/React-Spreadsheet-Component/master/dist/spreadsheet.js"
                :provides  ["no-idea"]}]

in the views

(def reactable-table (r/adapt-react-class js/Reactable.Table))

(defn example []
  [:div
  [reactable-table
    {:data (clj->js [
                 {:name "Foo" :section 51}
                 {:name "Bar" :section 51}])}]])

Note however that this component bundles lots of dependencies (jQuery). You might be better of by making a component like this yourself, in clojurescript/reagent.


Related Query

More Query from same tag