clojurescript

ClojureScript, a dialect of Clojure that compiles to JavaScript http://clojurescript.org | Currently at 1.10.879
ns 2020-10-05T15:55:55.284300Z

Hi, Clojurescript beginner here, I'm trying to integrate MaterializeCss into my project, specifically SideNav component, but i'm unsure how to do so from Clojurescript. I'm trying to write this line in CLJS but it says that var M is undefined: var instance = M.Sidenav.getInstance(elem); I've included materialize css at the top of html file before the application code. Here is the documentation for this library: https://materializecss.com/sidenav.html Update: so far I've figured out that I can get access to "M" by defining it like so (def M (js* "M")) Still don't know how to pull off this one though: var instance = M.Sidenav.getInstance(elem);

Rama 2020-10-06T09:29:07.296400Z

Yes, this has made my life easy too... thank you @rberger

ns 2020-10-06T14:00:32.301700Z

@rberger Great tool, thank you!

thheller 2020-10-05T16:11:24.285100Z

(let [instance (js/M.Sidenav.getInstance elem)] ...)

ns 2020-10-05T16:13:45.285500Z

@thheller Thank you so much!